Skip to content

Commit

Permalink
Merge pull request #2775 from transcom/ttv_168758755_fix_storybook_build
Browse files Browse the repository at this point in the history
Ttv 168758755 fix storybook build
  • Loading branch information
donaldthai committed Oct 4, 2019
2 parents a2a3b33 + c43b588 commit aa1ce71
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .circleci/config.yml
Expand Up @@ -534,6 +534,22 @@ jobs:
repo: app
- announce_failure

# `build_storybook_app` builds the storybook application container and pushes to the container repository
build_storybook_app:
executor: mymove_medium
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- restore_cache:
keys:
- v2-cache-yarn-v2-{{ checksum "yarn.lock" }}
- restore_cache:
keys:
- v2-mymove-node-modules-{{ checksum "yarn.lock" }}
- run: make storybook_build
- announce_failure

# `build_migrations` builds the migrations container and pushes to the container repository
build_migrations:
executor: mymove_small
Expand Down Expand Up @@ -876,6 +892,11 @@ workflows:
- pre_deps_yarn
- acceptance_tests_local # don't bother building and pushing the application if it won't even start properly

- build_storybook_app:
requires:
- anti_virus
- pre_deps_yarn

- build_tools:
requires:
- anti_virus
Expand Down
19 changes: 19 additions & 0 deletions .storybook/webpack.config.js
@@ -0,0 +1,19 @@
// remove eslint from the webpack configuration to use the create-react-app eslint config
const removeEsLint = exports => {
return (
exports.module.rules
.filter(e => e.use && e.use.some(e => e.options && void 0 !== e.options.useEslintrc))
.forEach(s => {
exports.module.rules = exports.module.rules.filter(e => e !== s);
}),
exports
);
};

module.exports = async ({ config, mode }) => {
// remove eslint from config
config = removeEsLint(config);

// return the new config
return config;
};
4 changes: 2 additions & 2 deletions Makefile
Expand Up @@ -859,8 +859,8 @@ spellcheck: .client_deps.stamp ## Run interactive spellchecker
storybook: ## Start the storybook server
yarn run storybook

.PHONY: build_storybook
build_storybook: ## Build static storybook site
.PHONY: storybook_build
storybook_build: ## Build static storybook site
yarn run build-storybook

#
Expand Down

0 comments on commit aa1ce71

Please sign in to comment.