Ver código fonte

nodemon --> onchange, because simpler and better options

Artur Paikin 8 anos atrás
pai
commit
3d453e51f1
1 arquivos alterados com 5 adições e 4 exclusões
  1. 5 4
      package.json

+ 5 - 4
package.json

@@ -61,6 +61,7 @@
     "node-sass": "4.5.0",
     "node-sass": "4.5.0",
     "nodemon": "1.8.1",
     "nodemon": "1.8.1",
     "npm-run-all": "2.3.0",
     "npm-run-all": "2.3.0",
+    "onchange": "3.2.1",
     "postcss": "5.1.0",
     "postcss": "5.1.0",
     "pre-commit": "1.1.3",
     "pre-commit": "1.1.3",
     "sass": "0.5.0",
     "sass": "0.5.0",
@@ -108,19 +109,19 @@
     "test:serve": "npm-run-all web:build --parallel start:server web:serve",
     "test:serve": "npm-run-all web:build --parallel start:server web:serve",
     "test:next-update": "next-update",
     "test:next-update": "next-update",
     "travis:deletecache": "travis cache --delete",
     "travis:deletecache": "travis cache --delete",
-    "watch:css": "nodemon --watch src --ext scss -x \"npm run build:css\"",
-    "watch:js": "nodemon --watch src --ext js -x 'npm run build:bundle'",
+    "watch:css": "onchange 'src/scss/**/*.scss' --initial --verbose -- npm run build:css",
+    "watch:js": "onchange 'src/**/*.js' --initial --verbose -- npm run build:bundle",
     "watch": "npm-run-all --parallel watch:js watch:css",
     "watch": "npm-run-all --parallel watch:js watch:css",
     "watch:fast": "npm-run-all --parallel watch:css web:preview",
     "watch:fast": "npm-run-all --parallel watch:css web:preview",
     "watch:example:browsersync": "browser-sync start --server example --port 3452 --serveStatic dist --files \"example/bundle.js, dist/uppy.min.css\"",
     "watch:example:browsersync": "browser-sync start --server example --port 3452 --serveStatic dist --files \"example/bundle.js, dist/uppy.min.css\"",
-    "watch:example:js": "watchify -t yo-yoify -t babelify example/main.js -o example/bundle.js -vd",
+    "watch:example:js": "watchify example/main.js -o example/bundle.js -vd",
     "watch:example": "npm-run-all --parallel watch:example:js watch:css watch:example:browsersync",
     "watch:example": "npm-run-all --parallel watch:example:js watch:css watch:example:browsersync",
     "web:build": "cd website && node update.js && ./node_modules/.bin/hexo generate --silent && node build-examples.js",
     "web:build": "cd website && node update.js && ./node_modules/.bin/hexo generate --silent && node build-examples.js",
     "web:clean": "cd website && ./node_modules/.bin/hexo clean",
     "web:clean": "cd website && ./node_modules/.bin/hexo clean",
     "web:deploy": "npm-run-all web:install web:disc docs web:build && ./bin/web-deploy",
     "web:deploy": "npm-run-all web:install web:disc docs web:build && ./bin/web-deploy",
     "web:disc": "npm run build:bundle:fullpath && discify dist/uppy-fp.js --output website/src/_disc.html && echo '---\nlayout: false\n---\n' |cat - website/src/_disc.html > website/src/disc.html && rm website/src/_disc.html",
     "web:disc": "npm run build:bundle:fullpath && discify dist/uppy-fp.js --output website/src/_disc.html && echo '---\nlayout: false\n---\n' |cat - website/src/_disc.html > website/src/disc.html && rm website/src/_disc.html",
     "web:install": "cd website && npm install",
     "web:install": "cd website && npm install",
-    "web:bundle:update:watch": "nodemon --watch dist --ext css,js -x 'node website/update.js'",
+    "web:bundle:update:watch": "onchange 'dist/**/*.css' 'dist/**/*.js' --initial --verbose -- node website/update.js",
     "web:examples:watch": "cd website && node build-examples.js watch",
     "web:examples:watch": "cd website && node build-examples.js watch",
     "web:serve": "cd website && ./node_modules/.bin/hexo server",
     "web:serve": "cd website && ./node_modules/.bin/hexo server",
     "web:preview": "npm-run-all --parallel web:examples:watch web:bundle:update:watch web:serve",
     "web:preview": "npm-run-all --parallel web:examples:watch web:bundle:update:watch web:serve",