From b5a5b23d9533b894ac5ca937684692fe048c107b Mon Sep 17 00:00:00 2001 From: Joffrey LEVEUGLE Date: Tue, 22 Dec 2020 15:34:21 +0100 Subject: [PATCH] build: downgrade to PostCSSv7to and watch css files using Storybook Due to compatibility reason, we should currently work with PostCSSv7, because Storybook is not up-to-date and use this version. Using v8 causes some instabilities in the stack. Cf: https://github.com/storybookjs/storybook/issues/13491 --- package.json | 9 +- packages/css/.storybook/main.js | 4 +- packages/css/.storybook/preview-head.html | 1 - packages/css/.storybook/preview.js | 2 + packages/css/package.json | 10 +- packages/css/src/index.css | 6 +- yarn.lock | 329 +++++++--------------- 7 files changed, 125 insertions(+), 236 deletions(-) diff --git a/package.json b/package.json index 7053410971..326879401a 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "bootstrap": "lerna bootstrap", "build": "lerna run build", "format": "lerna run format", - "postinstall": "husky install", + "postinstall": "npx husky install", "lint": "lerna run lint", "lint:fix": "lerna run lint:fix", "pack": "lerna run pack", @@ -48,7 +48,6 @@ "@storybook/addon-essentials": "^6.1.11", "@storybook/addon-links": "^6.1.11", "@storybook/html": "^6.1.11", - "autoprefixer": "^10.1.0", "babel-loader": "^8.2.2", "chokidar-cli": "^2.1.0", "cross-env": "^7.0.3", @@ -58,9 +57,9 @@ "lerna": "^3.22.1", "lint-staged": "^10.5.3", "npm-run-all": "^4.1.5", - "postcss": "^8.2.1", - "postcss-cli": "^8.3.1", - "postcss-import": "^14.0.0", + "postcss-cli": "^7.1.2", + "postcss-import": "^12.0.0", + "postcss-loader": "^4.1.0", "prettier": "^2.2.1" }, "licenses": [ diff --git a/packages/css/.storybook/main.js b/packages/css/.storybook/main.js index 236afa03e7..f5ab4d49a3 100644 --- a/packages/css/.storybook/main.js +++ b/packages/css/.storybook/main.js @@ -1,3 +1,5 @@ +const path = require('path'); + module.exports = { stories: [ '../src/stories/*.stories.(mdx|js)', @@ -8,5 +10,5 @@ module.exports = { '@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-storysource', - ], + ] }; diff --git a/packages/css/.storybook/preview-head.html b/packages/css/.storybook/preview-head.html index 4c18d472df..f2e793c21b 100644 --- a/packages/css/.storybook/preview-head.html +++ b/packages/css/.storybook/preview-head.html @@ -6,7 +6,6 @@ href="https://fonts.googleapis.com/css2?family=Roboto+Condensed:ital,wght@0,400;0,700;1,700&display=swap" rel="stylesheet" /> -