Skip to content

Commit

Permalink
Merge pull request #854 from ml5js/bomani.build-examples-on-changes
Browse files Browse the repository at this point in the history
Rebuild examples.json on changes to examples directory
  • Loading branch information
joeyklee authored Apr 7, 2020
2 parents 3534342 + 9352dfd commit 2c71efb
Show file tree
Hide file tree
Showing 2 changed files with 184 additions and 17 deletions.
193 changes: 179 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"scripts": {
"commit": "git-cz",
"prebuild": "rimraf dist",
"develop": "npm-run-all --parallel start examples:serve",
"develop": "npm-run-all --parallel start examples:serve examples:watch",
"start": "webpack-dev-server --config webpack.dev.babel.js",
"manual-test": "webpack-dev-server --open --config webpack.test.babel.js",
"build": "webpack --config webpack.prod.babel.js --config-name ml5",
Expand All @@ -23,8 +23,9 @@
"publish:npm": "npm run build && npm publish",
"contributors:add": "all-contributors add",
"contributors:generate": "all-contributors generate",
"examples:serve": "live-server ./examples --port=8081 --mount=/:./examples",
"examples:serve": "live-server ./examples --port=8081 --mount=/:./examples --wait=250",
"examples:update-json": "node scripts/update-examples-json.js",
"examples:watch": "onchange -f 'addDir unlinkDir' './examples' -- npm run examples:update-json",
"preexamples:build": "rimraf dist_examples",
"examples:build": "npm run examples:update-json && webpack --config webpack.prod.babel.js --config-name examples"
},
Expand Down Expand Up @@ -115,6 +116,7 @@
"@tensorflow/tfjs-vis": "^1.1.0",
"events": "^3.0.0",
"face-api.js": "~0.22.2",
"live-server": "^1.2.1"
"live-server": "^1.2.1",
"onchange": "^6.1.0"
}
}

0 comments on commit 2c71efb

Please sign in to comment.