Skip to content

Commit

Permalink
Build: re-run browserify when generating site (#9275)
Browse files Browse the repository at this point in the history
(fixes eslint/archive-website#407)

This updates the `npm run gensite` script to run browserify as part of the site generation, rather than using whatever it finds in `build/eslint.js`. This has a few advantages:

* The built file will always be up-to-date (previously, it would reflect the state of the repository whenever `npm test` was last run).
* The gensite script won't fail if it's run on its own and there isn't a `build/` directory.
  • Loading branch information
not-an-aardvark authored and kaicataldo committed Sep 10, 2017
1 parent 7685fed commit abc8634
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Makefile.js
Expand Up @@ -792,6 +792,7 @@ target.gensite = function(prereleaseVersion) {
// 13. Update demos, but only for non-prereleases
if (!prereleaseVersion) {
echo("> Updating the demos (Step 13)");
target.browserify();
cp("-f", "build/eslint.js", `${SITE_DIR}js/app/eslint.js`);
} else {
echo("> Skipped updating the demos (Step 13)");
Expand Down

0 comments on commit abc8634

Please sign in to comment.