diff options
author | silverwind <me@silverwind.io> | 2020-01-25 12:44:36 +0100 |
---|---|---|
committer | zeripath <art27@cantab.net> | 2020-01-25 11:44:36 +0000 |
commit | 8ca07305fb0583e6121c9d56edb05cbf7dd9d7b5 (patch) | |
tree | 264cee95ed60a1af27e77f706ee26237fb4c0575 /Makefile | |
parent | a67c06ce90fb3bea97987501377e4dc5f24d2151 (diff) | |
download | gitea-8ca07305fb0583e6121c9d56edb05cbf7dd9d7b5.tar.gz gitea-8ca07305fb0583e6121c9d56edb05cbf7dd9d7b5.zip |
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
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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;) |