Skip to content
Snippets Groups Projects
Commit 5f5a44fd authored by Elmar Ludwig's avatar Elmar Ludwig Committed by David Siegfried
Browse files

replace use of "npm bin" with "npx", fixes #2122

Closes #2122

Merge request !1376
parent cff48047
No related branches found
No related tags found
No related merge requests found
CODECEPT = composer/bin/codecept CODECEPT = composer/bin/codecept
CATALOGS = locale/en/LC_MESSAGES/studip.mo locale/en/LC_MESSAGES/js-resources.json CATALOGS = locale/en/LC_MESSAGES/studip.mo locale/en/LC_MESSAGES/js-resources.json
NPM_BIN = $(shell npm bin)
RESOURCES = $(shell find resources -type f) RESOURCES = $(shell find resources -type f)
PHP_SOURCES = $(shell find app config lib public templates -name '*.php' \( ! -path 'public/plugins_packages/*' -o -path 'public/plugins_packages/core/*' \)) PHP_SOURCES = $(shell find app config lib public templates -name '*.php' \( ! -path 'public/plugins_packages/*' -o -path 'public/plugins_packages/core/*' \))
...@@ -79,17 +78,17 @@ test-unit: $(CODECEPT) ...@@ -79,17 +78,17 @@ test-unit: $(CODECEPT)
catalogs: npm $(CATALOGS) catalogs: npm $(CATALOGS)
optimize-icons: npm optimize-icons: npm
find public/assets/images/icons -type f | xargs -P0 $(NPM_BIN)/svgo -q --config=config/svgo.config.js find public/assets/images/icons -type f | xargs -P0 npx svgo -q --config=config/svgo.config.js
# default rules for gettext handling # default rules for gettext handling
js-%.pot: $(VUE_SOURCES) js-%.pot: $(VUE_SOURCES)
$(NPM_BIN)/gettext-extract --attribute v-translate --output $@ $(VUE_SOURCES) npx gettext-extract --attribute v-translate --output $@ $(VUE_SOURCES)
js-%.po: js-%.pot js-%.po: js-%.pot
msgmerge -qU -C $(dir $@)studip.po $@ $< msgmerge -qU -C $(dir $@)studip.po $@ $<
js-%.json: js-%.po js-%.json: js-%.po
$(NPM_BIN)/gettext-compile --output $@ $< npx gettext-compile --output $@ $<
sed -i~ 's/^{[^{]*//;s/}$$//' $@ sed -i~ 's/^{[^{]*//;s/}$$//' $@
%.pot: $(PHP_SOURCES) %.pot: $(PHP_SOURCES)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment