From 838e06416380f19c00f300cbb1b6dfe43ed9bef7 Mon Sep 17 00:00:00 2001 From: eric-burel Date: Tue, 2 Feb 2021 16:45:08 +0100 Subject: [PATCH] add CSS modules support in Storybook --- .storybook/main.js | 2 ++ package.json | 3 ++- src/pages/docs/release-process.md | 7 +++++-- yarn.lock | 5 +++++ 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.storybook/main.js b/.storybook/main.js index 26643bd2..f39ff7f2 100644 --- a/.storybook/main.js +++ b/.storybook/main.js @@ -28,6 +28,8 @@ module.exports = { "@storybook/addon-a11y", // @see https://github.com/vercel/next.js/issues/19345 // "@next/plugin-storybook", + // handle CSS modules (until we have a Next plugin that does it for us) + "storybook-css-modules-preset", ], // https://github.com/storybookjs/storybook/blob/next/docs/src/pages/configurations/custom-webpack-config/index.md#debug-the-default-webpack-config webpackFinal: async (config, { configType }) => { diff --git a/package.json b/package.json index 1427c553..f837dfbd 100644 --- a/package.json +++ b/package.json @@ -109,6 +109,7 @@ "graphql-voyager": "^1.0.0-rc.31", "react-is": "^16.13.1", "source-map-support": "^0.5.19", + "storybook-css-modules-preset": "^1.0.5", "ts-loader": "^7.0.5", "ts-node": "^8.10.2", "typescript": "^3.9.0" @@ -139,8 +140,8 @@ "jest": "^26.0.1", "jest-transformer-mdx": "^2.2.0", "nyc": "^15.1.0", - "shelljs": "^0.8.4", "serve": "^11.3.2", + "shelljs": "^0.8.4", "start-server-and-test": "^1.11.0" } } diff --git a/src/pages/docs/release-process.md b/src/pages/docs/release-process.md index 4c3ce693..8012a850 100644 --- a/src/pages/docs/release-process.md +++ b/src/pages/docs/release-process.md @@ -16,6 +16,11 @@ rm -Rf node_modules && yarn install # no missing module surprise ## Run the app, run tests +```sh +# Run mongo in a separate shell +yarn run start:mongo +``` + ```sh ### Test process @@ -36,8 +41,6 @@ yarn run build:static && yarn run start:static # Run tests yarn run test # Run tests specific to Vulcan Next (longer) -# /!\ need docker to run -yarn run start:mongo yarn run test:vn # Test storybook yarn run storybook diff --git a/yarn.lock b/yarn.lock index 46ada12b..1e90cb88 100644 --- a/yarn.lock +++ b/yarn.lock @@ -16324,6 +16324,11 @@ store2@^2.7.1: resolved "https://registry.yarnpkg.com/store2/-/store2-2.12.0.tgz#e1f1b7e1a59b6083b2596a8d067f6ee88fd4d3cf" integrity sha512-7t+/wpKLanLzSnQPX8WAcuLCCeuSHoWdQuh9SB3xD0kNOM38DNf+0Oa+wmvxmYueRzkmh6IcdKFtvTa+ecgPDw== +storybook-css-modules-preset@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/storybook-css-modules-preset/-/storybook-css-modules-preset-1.0.5.tgz#8963bab91c42a66fc757610323d280d76a06d07b" + integrity sha512-NcGOdU7Woh1RMz7ftaDh6ThePRaW/5Cuh5AH5lK+5D9ue5X9cFxSvkWCZUswcGOS8Z6GNifeTx7UoH6nuWZPFg== + stream-browserify@3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-3.0.0.tgz#22b0a2850cdf6503e73085da1fc7b7d0c2122f2f"