-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(libs/movex-react-local-master): ✨ add storybook to test the inte…
…raactions easier
- Loading branch information
1 parent
2fc5f8f
commit e0347fc
Showing
26 changed files
with
8,601 additions
and
145 deletions.
There are no files selected for viewing
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,12 @@ | ||
import type { StorybookConfig } from '@storybook/core-common'; | ||
|
||
export const rootMain: StorybookConfig = { | ||
stories: [], | ||
addons: ['@storybook/addon-essentials'], | ||
// webpackFinal: async (config, { configType }) => { | ||
// // Make whatever fine-grained changes you need that should apply to all storybook configs | ||
|
||
// // Return the altered config | ||
// return 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "../tsconfig.base.json", | ||
"exclude": [ | ||
"../**/*.spec.js", | ||
"../**/*.test.js", | ||
"../**/*.spec.ts", | ||
"../**/*.test.ts", | ||
"../**/*.spec.tsx", | ||
"../**/*.test.tsx", | ||
"../**/*.spec.jsx", | ||
"../**/*.test.jsx" | ||
], | ||
"include": ["../**/*"] | ||
} |
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,27 @@ | ||
import { rootMain } from '../../../.storybook/main'; | ||
import type { StorybookConfig, Options } from '@storybook/core-common'; | ||
|
||
const config: StorybookConfig = { | ||
...rootMain, | ||
|
||
core: { ...rootMain.core, builder: 'webpack5' }, | ||
|
||
stories: [ | ||
...rootMain.stories, | ||
'../src/stories/**/*.stories.mdx', | ||
'../src/stories/**/*.stories.@(js|jsx|ts|tsx)', | ||
], | ||
addons: [...(rootMain.addons || []), '@nrwl/react/plugins/storybook'], | ||
webpackFinal: async (config, { configType }: Options) => { | ||
// apply any global webpack configs that might have been specified in .storybook/main.ts | ||
if (rootMain.webpackFinal) { | ||
config = await rootMain.webpackFinal(config, { configType } as Options); | ||
} | ||
|
||
// add your own webpack tweaks if needed | ||
|
||
return config; | ||
}, | ||
}; | ||
|
||
module.exports = config; |
Empty file.
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,27 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"emitDecoratorMetadata": true, | ||
"outDir": "" | ||
}, | ||
"files": [ | ||
"../../../node_modules/@nrwl/react/typings/styled-jsx.d.ts", | ||
"../../../node_modules/@nrwl/react/typings/cssmodule.d.ts", | ||
"../../../node_modules/@nrwl/react/typings/image.d.ts" | ||
], | ||
"exclude": [ | ||
"../**/*.spec.ts", | ||
"../**/*.spec.js", | ||
"../**/*.spec.tsx", | ||
"../**/*.spec.jsx" | ||
], | ||
"include": [ | ||
"../src/**/*.stories.ts", | ||
"../src/**/*.stories.js", | ||
"../src/**/*.stories.jsx", | ||
"../src/**/*.stories.tsx", | ||
"../src/**/*.stories.mdx", | ||
"*.ts", | ||
"*.js" | ||
] | ||
} |
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 |
---|---|---|
|
@@ -17,7 +17,6 @@ | |
"app", | ||
"framework" | ||
], | ||
"type": "commonjs", | ||
"engines": { | ||
"node": ">= 16.0.0" | ||
}, | ||
|
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,15 @@ | ||
const { join } = require('path'); | ||
|
||
// Note: If you use library-specific PostCSS/Tailwind configuration then you should remove the `postcssConfig` build | ||
// option from your application's configuration (i.e. project.json). | ||
// | ||
// See: https://nx.dev/guides/using-tailwind-css-in-react#step-4:-applying-configuration-to-libraries | ||
|
||
module.exports = { | ||
plugins: { | ||
tailwindcss: { | ||
config: join(__dirname, 'tailwind.config.js'), | ||
}, | ||
autoprefixer: {}, | ||
}, | ||
}; |
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,7 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
|
||
@import 'tailwindcss/base'; | ||
@import 'tailwindcss/components'; | ||
@import 'tailwindcss/utilities'; |
Oops, something went wrong.