Skip to content

Commit 8ca0730

Browse files
silverwindzeripath
authored andcommitted
make node_modules a order-only prerequisite (#9923)
* make node_modules a order-only prerequisite Package installations and our fomantic step results in changes inside node_modules which lead to make triggering that target unnecessarily. Moved all node_modules prerequisites to order-only which will make skip the timestamp check on in and eliminate useless npm calls. Changes in package-lock.json will still result in reinstallation so node_modules should stay consistent. * revert change to clean-all
1 parent a67c06c commit 8ca0730

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

+4-4
Original file line numberDiff line numberDiff line change
@@ -470,29 +470,29 @@ node_modules: package-lock.json
470470
npm install --no-save
471471

472472
.PHONY: npm-update
473-
npm-update: node-check node_modules
473+
npm-update: node-check | node_modules
474474
npx updates -cu
475475
rm -rf node_modules package-lock.json
476476
npm install --package-lock
477477

478478
.PHONY: js
479479
js: node-check $(JS_DEST)
480480

481-
$(JS_DEST): node_modules $(JS_SOURCES)
481+
$(JS_DEST): $(JS_SOURCES) | node_modules
482482
npx eslint web_src/js webpack.config.js
483483
npx webpack --hide-modules --display-entrypoints=false
484484

485485
.PHONY: fomantic
486486
fomantic: node-check $(FOMANTIC_DEST_DIR)
487487

488-
$(FOMANTIC_DEST_DIR): node_modules semantic.json web_src/fomantic/theme.config.less
488+
$(FOMANTIC_DEST_DIR): semantic.json web_src/fomantic/theme.config.less | node_modules
489489
cp web_src/fomantic/theme.config.less node_modules/fomantic-ui/src/theme.config
490490
npx gulp -f node_modules/fomantic-ui/gulpfile.js build
491491

492492
.PHONY: css
493493
css: node-check $(CSS_DEST)
494494

495-
$(CSS_DEST): node_modules $(CSS_SOURCES)
495+
$(CSS_DEST): $(CSS_SOURCES) | node_modules
496496
npx stylelint web_src/less
497497
npx lessc web_src/less/index.less public/css/index.css
498498
$(foreach file, $(filter-out web_src/less/themes/_base.less, $(wildcard web_src/less/themes/*)),npx lessc web_src/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)

0 commit comments

Comments
 (0)