Skip to content

Commit

Permalink
refactor watch process
Browse files Browse the repository at this point in the history
  • Loading branch information
zorza committed Nov 27, 2016
1 parent a96824f commit bf82c5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 5 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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"
Expand Down

0 comments on commit bf82c5c

Please sign in to comment.