-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: introduced compatibility with storybook 6
feat: introduced compatibility with storybook 6
- Loading branch information
Showing
31 changed files
with
53,686 additions
and
230 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,66 @@ | ||
name: Main CI | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
distTag: | ||
description: 'Dist tag to publish' | ||
required: true | ||
default: 'latest' | ||
pull_request: | ||
push: | ||
branches: | ||
- 'master' | ||
|
||
jobs: | ||
build_and_testing: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
BUNDLESIZE_GITHUB_TOKEN: ${{ secrets.BUNDLESIZE_GITHUB_TOKEN }} | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Restore cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.npm | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- uses: actions/setup-node@v2-beta | ||
with: | ||
always-auth: true | ||
node-version: 12 | ||
- name: Creates local .npmrc | ||
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | ||
|
||
- name: Install | ||
run: npm ci | ||
|
||
- name: Build & Testing | ||
run: | | ||
npm run lint | ||
npm run build | ||
npm run test | ||
npm run bundle-size | ||
- name: Release | ||
if: ${{github.event.inputs.distTag == 'latest' || github.event.inputs.distTag == 'next'}} | ||
run: | | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "CI" | ||
npm run release && npm run publish-storybook | ||
- name: Release Docs | ||
if: ${{github.event.inputs.distTag == 'latest' || github.event.inputs.distTag == 'next'}} | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
BRANCH: gh-pages | ||
FOLDER: example/storybook-static |
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 |
---|---|---|
|
@@ -2,6 +2,5 @@ node_modules | |
dist | ||
coverage | ||
.cache | ||
package-lock.json | ||
.DS_Store | ||
pkg |
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,3 @@ | ||
{ | ||
"typescript.tsdk": "node_modules/typescript/lib" | ||
} |
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,2 @@ | ||
node_modules | ||
storybook-static |
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 |
---|---|---|
@@ -1,16 +1,10 @@ | ||
module.exports = { | ||
stories: ['../stories/**/*.stories.(tsx|ts)'], | ||
addons: ['@storybook/addon-docs', '@storybook/addon-actions', '@storybook/addon-links'], | ||
webpackFinal: async config => { | ||
config.module.rules.push({ | ||
test: /\.(ts|tsx)$/, | ||
use: [ | ||
{ | ||
loader: require.resolve('ts-loader'), | ||
}, | ||
], | ||
}); | ||
config.resolve.extensions.push('.ts', '.tsx'); | ||
return config; | ||
}, | ||
}; | ||
stories: [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
addons: [ | ||
"@storybook/addon-docs", | ||
"themeprovider-storybook/register" | ||
] | ||
} |
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,46 @@ | ||
import { withThemesProvider } from "themeprovider-storybook" | ||
const THEMES = [ | ||
{ | ||
name: 'Light', | ||
backgroundColor: '#fff', | ||
palette: { | ||
TextField: { | ||
backgroundColor: '#f3f3f3', | ||
fontColor: '#212e45', | ||
borderColor: '#e2e6f3', | ||
placeholderColor: '#999999', | ||
opacityDisabled: 0.25, | ||
borderError: '#e25a66', | ||
}, | ||
Common: { | ||
backgroundColor: '#1a213f', | ||
fontColor: '#808ab1', | ||
borderError: '#e25a66' | ||
}, | ||
} | ||
}, | ||
{ | ||
name: 'Dark', | ||
backgroundColor: '#121833', | ||
palette: { | ||
TextField: { | ||
backgroundColor: '#1a213f', | ||
fontColor: '#808ab1', | ||
borderColor: '#808ab1', | ||
placeholderColor: '#808ab1', | ||
opacityDisabled: 0.45, | ||
borderError: '#e25a66' | ||
}, | ||
Common: { | ||
backgroundColor: '#1a213f', | ||
fontColor: '#808ab1', | ||
borderError: '#e25a66' | ||
}, | ||
} | ||
}, | ||
] | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
} | ||
export const decorators = [withThemesProvider(THEMES)]; |
Oops, something went wrong.