From f0ee18f7018544037a72087b0d53855935eaa93c Mon Sep 17 00:00:00 2001 From: Steven Sinatra Date: Sun, 23 Apr 2017 16:59:22 +1000 Subject: [PATCH] Change CSS preprocessors doc for composability Since there are dupes in `watch-css` we can just run the same command written in the `build-css` npm script, escape the following params with `--` and specify the params for `build-css`. --- packages/react-scripts/template/README.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/react-scripts/template/README.md b/packages/react-scripts/template/README.md index 0cda7e071f6..b60c636da87 100644 --- a/packages/react-scripts/template/README.md +++ b/packages/react-scripts/template/README.md @@ -430,7 +430,7 @@ Then in `package.json`, add the following lines to `scripts`: ```diff "scripts": { + "build-css": "node-sass src/ -o src/", -+ "watch-css": "npm run build-css && node-sass src/ -o src/ --watch --recursive", ++ "watch-css": "npm run build-css && npm run build-css -- --watch --recursive", "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test --env=jsdom", @@ -455,7 +455,7 @@ Then we can change `start` and `build` scripts to include the CSS preprocessor c ```diff "scripts": { "build-css": "node-sass src/ -o src/", - "watch-css": "npm run build-css && node-sass src/ -o src/ --watch --recursive", + "watch-css": "npm run build-css && npm run build-css -- --watch --recursive", - "start": "react-scripts start", - "build": "react-scripts build", + "start-js": "react-scripts start", @@ -482,9 +482,8 @@ And in your scripts: ```diff "scripts": { - "build-css": "node-sass src/ -o src/", -- "watch-css": "npm run build-css && node-sass src/ -o src/ --watch --recursive" + "build-css": "node-sass-chokidar src/ -o src/", -+ "watch-css": "npm run build-css && node-sass-chokidar src/ -o src/ --watch --recursive" + "watch-css": "npm run build-css && npm run build-css -- --watch --recursive" } ```