]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Update watch scripts to properly copy JS files
authorMark Otto <markdotto@gmail.com>
Tue, 3 Jul 2018 07:43:57 +0000 (00:43 -0700)
committerMark Otto <otto@github.com>
Thu, 12 Jul 2018 06:30:46 +0000 (23:30 -0700)
- Updates nodemon scripts to watch specific directories instead of ignoring several
- Split watch tasks for CSS and JS into main and docs
- Add docs-watch script to serve the docs instead of just build
- Add new start script so that instead of two tabs, one for docs-watch and one for watch, we just run npm start

package.json

index 5b8571700c05923cbd5ea50482f492a410d5171b..d2543b187c4aeb220647e9c07003e362808343d3 100644 (file)
     "Twitter, Inc."
   ],
   "scripts": {
+    "start": "npm-run-all --parallel watch-css-main watch-css-docs watch-js-main watch-js-docs docs-watch",
     "blc": "blc --exclude-external --filter-level 3 --get --ordered --recursive --host-requests 4 --input http://localhost:3000/",
     "http-server": "http-server --silent -p 3000",
     "bundlesize": "bundlesize",
     "check-broken-links": "npm-run-all --parallel --race \"http-server -- _gh_pages/\" blc",
-    "css": "npm-run-all --parallel css-lint* css-compile* --sequential css-prefix* css-minify* css-copy",
+    "css": "npm-run-all --parallel css-lint* css-compile* --sequential css-prefix* css-minify*",
     "css-main": "npm-run-all --parallel css-lint css-compile --sequential css-prefix css-minify",
     "css-docs": "npm-run-all --parallel css-lint-docs css-compile-docs --sequential css-prefix-docs css-minify-docs",
     "css-compile": "node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/bootstrap.scss dist/css/bootstrap.css && node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/bootstrap-grid.scss dist/css/bootstrap-grid.css && node-sass --output-style expanded --source-map true --source-map-contents true --precision 6 scss/bootstrap-reboot.scss dist/css/bootstrap-reboot.css",
@@ -58,6 +59,7 @@
     "coveralls": "shx cat js/coverage/lcov.info | coveralls",
     "docs": "npm-run-all --parallel css-docs js-docs --sequential docs-compile docs-lint",
     "docs-compile": "bundle exec jekyll build",
+    "docs-watch": "bundle exec jekyll serve",
     "postdocs-compile": "npm run docs-workbox-precache",
     "docs-github": "shx echo \"github: true\" > twbsconfig.yml && npm run docs-compile -- --config _config.yml,twbsconfig.yml && shx rm ./twbsconfig.yml",
     "docs-github-serve": "bundle exec jekyll serve --skip-initial-build --no-watch",
     "saucelabs-test": "node build/saucelabs-unit-test.js",
     "dist": "npm-run-all --parallel css js",
     "test": "npm-run-all dist js-test docs-compile docs-lint bundlesize",
-    "watch": "npm-run-all --parallel watch-css watch-js",
-    "watch-css": "nodemon --ignore js/ --ignore dist/ -e scss -x \"npm run css\"",
-    "watch-js": "nodemon --ignore scss/ --ignore js/dist/ --ignore dist/ -e js -x \"npm run js-compile\""
+    "watch": "npm-run-all --parallel watch-css-main watch-css-docs watch-js-main watch-js-docs",
+    "watch-css-main": "nodemon --watch scss/ --ext scss --exec \"npm run css-main && npm run css-copy\"",
+    "watch-css-docs": "nodemon --watch site/docs/4.1/assets/scss/ --ext scss --exec \"npm run css-docs\"",
+    "watch-js-main": "nodemon --watch js/src/ --ext js --exec \"npm run js-compile && npm run js-copy\"",
+    "watch-js-docs": "nodemon --watch site/docs/4.1/assets/js/src/ --ext js --exec \"npm run js-docs\""
   },
   "style": "dist/css/bootstrap.css",
   "sass": "scss/bootstrap.scss",