Skip to content

Commit

Permalink
Add storybook and a Header story
Browse files Browse the repository at this point in the history
  • Loading branch information
marcaaron committed Jan 16, 2021
1 parent d8867ef commit 40af9b7
Show file tree
Hide file tree
Showing 10 changed files with 9,425 additions and 2,602 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
- name: Build web
run: npm run build

- name: Build docs
run: npm run build-storybook -- -o dist/docs

- name: Deploy to S3
run: aws s3 cp --recursive --acl public-read $GITHUB_WORKSPACE/dist s3://chat-test-expensify-com/

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,6 @@ fastlane/screenshots

# Local DEV config
/.env

# Storybook build files
storybook-static
10 changes: 10 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module.exports = {
stories: [
'../src/**/*.stories.mdx',
'../src/**/*.stories.@(js|jsx|ts|tsx)'
],
addons: [
'@storybook/addon-essentials',
'@storybook/addon-a11y'
]
};
1 change: 1 addition & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import '../assets/css/fonts.css';
7 changes: 7 additions & 0 deletions .storybook/webpack.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const custom = require('../config/webpack/webpack.common');

module.exports = {
webpackFinal: (config) => {
return {...config, module: {...config.module, rules: custom.module.rules}};
},
};
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ const metro = {
module.exports = ({caller}) => {
// For `react-native` (iOS/Android) caller will be "metro"
// For `webpack` (Web) caller will be "@babel-loader"
const runningIn = caller(({name}) => name);
const runningIn = caller((args = {}) => args.name);
return ['metro', 'babel-jest'].includes(runningIn) ? metro : webpack;
};
Loading

0 comments on commit 40af9b7

Please sign in to comment.