From 8ca07305fb0583e6121c9d56edb05cbf7dd9d7b5 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 25 Jan 2020 12:44:36 +0100 Subject: 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 --- Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index deeae9e53e..350b7e8d75 100644 --- a/Makefile +++ b/Makefile @@ -470,7 +470,7 @@ node_modules: package-lock.json npm install --no-save .PHONY: npm-update -npm-update: node-check node_modules +npm-update: node-check | node_modules npx updates -cu rm -rf node_modules package-lock.json npm install --package-lock @@ -478,21 +478,21 @@ npm-update: node-check node_modules .PHONY: js js: node-check $(JS_DEST) -$(JS_DEST): node_modules $(JS_SOURCES) +$(JS_DEST): $(JS_SOURCES) | node_modules npx eslint web_src/js webpack.config.js npx webpack --hide-modules --display-entrypoints=false .PHONY: fomantic fomantic: node-check $(FOMANTIC_DEST_DIR) -$(FOMANTIC_DEST_DIR): node_modules semantic.json web_src/fomantic/theme.config.less +$(FOMANTIC_DEST_DIR): semantic.json web_src/fomantic/theme.config.less | node_modules cp web_src/fomantic/theme.config.less node_modules/fomantic-ui/src/theme.config npx gulp -f node_modules/fomantic-ui/gulpfile.js build .PHONY: css css: node-check $(CSS_DEST) -$(CSS_DEST): node_modules $(CSS_SOURCES) +$(CSS_DEST): $(CSS_SOURCES) | node_modules npx stylelint web_src/less npx lessc web_src/less/index.less public/css/index.css $(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;) -- cgit v1.2.3