mirror of https://github.com/go-gitea/gitea.git
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
This commit is contained in:
parent
a67c06ce90
commit
8ca07305fb
8
Makefile
8
Makefile
|
@ -470,7 +470,7 @@ node_modules: package-lock.json
|
||||||
npm install --no-save
|
npm install --no-save
|
||||||
|
|
||||||
.PHONY: npm-update
|
.PHONY: npm-update
|
||||||
npm-update: node-check node_modules
|
npm-update: node-check | node_modules
|
||||||
npx updates -cu
|
npx updates -cu
|
||||||
rm -rf node_modules package-lock.json
|
rm -rf node_modules package-lock.json
|
||||||
npm install --package-lock
|
npm install --package-lock
|
||||||
|
@ -478,21 +478,21 @@ npm-update: node-check node_modules
|
||||||
.PHONY: js
|
.PHONY: js
|
||||||
js: node-check $(JS_DEST)
|
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 eslint web_src/js webpack.config.js
|
||||||
npx webpack --hide-modules --display-entrypoints=false
|
npx webpack --hide-modules --display-entrypoints=false
|
||||||
|
|
||||||
.PHONY: fomantic
|
.PHONY: fomantic
|
||||||
fomantic: node-check $(FOMANTIC_DEST_DIR)
|
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
|
cp web_src/fomantic/theme.config.less node_modules/fomantic-ui/src/theme.config
|
||||||
npx gulp -f node_modules/fomantic-ui/gulpfile.js build
|
npx gulp -f node_modules/fomantic-ui/gulpfile.js build
|
||||||
|
|
||||||
.PHONY: css
|
.PHONY: css
|
||||||
css: node-check $(CSS_DEST)
|
css: node-check $(CSS_DEST)
|
||||||
|
|
||||||
$(CSS_DEST): node_modules $(CSS_SOURCES)
|
$(CSS_DEST): $(CSS_SOURCES) | node_modules
|
||||||
npx stylelint web_src/less
|
npx stylelint web_src/less
|
||||||
npx lessc web_src/less/index.less public/css/index.css
|
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;)
|
$(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;)
|
||||||
|
|
Loading…
Reference in New Issue