Skip to content

Commit

Permalink
Update watch scripts to properly copy JS files
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
mdo committed Jul 12, 2018
1 parent 01f568d commit 159aebc
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 159aebc

Please sign in to comment.