diff options
| author | Mark Otto <[email protected]> | 2018-07-03 00:43:57 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2018-07-11 23:30:46 -0700 |
| commit | 159aebc27461553e2ad9ff26a3922eff2d392a34 (patch) | |
| tree | 6639584911c19bf702b27c397b123fa9eefa9d9f /package.json | |
| parent | 01f568d9a5c60b3bd7c85c409247e117dd11df9f (diff) | |
| download | bootstrap-159aebc27461553e2ad9ff26a3922eff2d392a34.tar.xz bootstrap-159aebc27461553e2ad9ff26a3922eff2d392a34.zip | |
Update watch scripts to properly copy JS files
- 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
Diffstat (limited to 'package.json')
| -rw-r--r-- | package.json | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/package.json b/package.json index 5b8571700..d2543b187 100644 --- a/package.json +++ b/package.json @@ -17,11 +17,12 @@ "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", @@ -73,9 +75,11 @@ "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", |
