-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(typescript): switch tests and stories to ts
- Loading branch information
1 parent
0b1a27b
commit 0c0cbc7
Showing
23 changed files
with
485 additions
and
302 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
import type { StorybookConfig } from "@storybook/react-webpack5"; | ||
const path = require('path') | ||
const config: StorybookConfig = { | ||
stories: [ | ||
'../packages/react/lib/**/*.stories.{js,tsx}', | ||
'../packages/theme/lib/**/*.stories.{js, tsx}', | ||
'../packages/**/lib/**/*.stories.{js,tsx}' | ||
], | ||
|
||
addons: [ | ||
'@storybook/addon-storysource', | ||
'@storybook/addon-actions', | ||
{ | ||
name: 'storybook-addon-swc', | ||
options: { | ||
swcLoaderOptions: { | ||
jsc: { | ||
parser: { | ||
syntax: 'typescript', | ||
tsx: true, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
{ | ||
name: '@storybook/addon-styling', | ||
options: { | ||
postCss: { | ||
implementation: require('postcss'), | ||
}, | ||
sass: { | ||
implementation: require('sass'), | ||
}, | ||
}, | ||
}, | ||
], | ||
framework: { | ||
name: '@storybook/react-webpack5', | ||
options: {} | ||
|
||
}, | ||
webpackFinal: (config) => { | ||
config.resolve = config.resolve || {}; | ||
config.resolve.alias = { | ||
...config.resolve?.alias, | ||
'@junipero/react': path.resolve(__dirname, '../packages/react/lib/index.ts'), | ||
'@junipero/core': path.resolve(__dirname, '../packages/core/lib/index.ts'), | ||
'@junipero/transitions': path.resolve(__dirname, '../packages/transitions/lib/index.tsx'), | ||
'@junipero/hooks': path.resolve(__dirname, '../packages/hooks/lib/index.ts'), | ||
}; | ||
return config; | ||
}, | ||
}; | ||
export default config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"extends": "./tsconfig.json", | ||
"exclude": ["**/*.stories.tsx"], | ||
"compilerOptions": { | ||
"emitDeclarationOnly": true, | ||
"declaration": true, | ||
"jsx": "react-jsx", | ||
"paths": {} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "../../tsconfig.json", | ||
"exclude": ["node_modules/**/*"], | ||
|
||
"include": ["./lib/**/*"], | ||
"compilerOptions": { | ||
"paths": { | ||
"@junipero/core": ["../core/lib/index.ts"], | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.