From bf82c5ccd7d19e112099537452fe709b2bea07ed Mon Sep 17 00:00:00 2001 From: zorza Date: Sun, 27 Nov 2016 13:31:22 +0100 Subject: [PATCH] refactor watch process --- CONTRIBUTING.md | 9 +++++---- package.json | 6 ++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 74cb4a0..3d30320 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,8 @@ 2. Install dependencies: `npm install` 3. Create your feature branch: `git checkout -b my-new-feature` 4. Build and watch: `npm run watch` -5. Make changes (go to 127.0.0.1:8080/build to see the preview) -6. Commit your changes: `git commit -am 'Add some feature'` -7. Push to the branch: `git push origin my-new-feature` -8. Submit a pull request \ No newline at end of file +5. Run server in separate terminal window: `npm run start` +6. Make changes (go to 127.0.0.1:8080/build to see the preview) +7. Commit your changes: `git commit -am 'Add some feature'` +8. Push to the branch: `git push origin my-new-feature` +9. Submit a pull request \ No newline at end of file diff --git a/package.json b/package.json index 2d4ea68..32c9595 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,10 @@ "scripts": { "css": "./node_modules/.bin/lessc --clean-css ./src/confront.less ./dist/confront.css && npm run cssToJs", "cssToJs": "mkdir -p ./src/generated && cp ./dist/confront.css ./src/generated/styles.js && node ./src/prepend.js && echo \\` >> ./src/generated/styles.js", - "clean": "./node_modules/.bin/rimraf ./dist/*.* && ./node_modules/.bin/rimraf ./build/*.*", "build": "npm run css && ./node_modules/.bin/webpack && mkdir -p ./build && cp ./src/index-build.html ./build/index.html && cp ./src/demo.css ./build", "build:demo": "mkdir -p ./demo && cp ./dist/confront.js ./demo && cp ./src/demo.css ./demo && cp ./src/index-demo.html ./demo/index.html", - "build:bundle": "npm run clean && npm run build && npm run build:demo && npm run uglify", - "watch": "watch 'npm run build && npm run start' ./src --ignoreDirectoryPattern /generated/", + "build:bundle": "npm run build && npm run build:demo && npm run uglify", + "watch": "watch 'npm run build' ./src --ignoreDirectoryPattern /generated/", "start": "./node_modules/.bin/http-server", "uglify": "./node_modules/.bin/uglifyjs ./dist/confront.js --compress --mangle --output ./dist/confront.min.js", "publish:patch": "npm run build:bundle && npm version patch && npm publish", @@ -32,7 +31,6 @@ "less": "^2.7.1", "less-plugin-clean-css": "^1.5.1", "prepend-file": "^1.3.1", - "rimraf": "^2.5.4", "uglify-js": "^2.7.4", "watch": "^1.0.1", "webpack": "^1.13.3"