mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-22 12:54:53 -05:00
use relative paths to node bin scripts, removing npx
This commit is contained in:
parent
3ebbfb1036
commit
119b725525
1 changed files with 12 additions and 9 deletions
21
Makefile
21
Makefile
|
@ -21,6 +21,7 @@ endif
|
||||||
BINDATA := modules/{options,public,templates}/bindata.go
|
BINDATA := modules/{options,public,templates}/bindata.go
|
||||||
GOFILES := $(shell find . -name "*.go" -type f ! -path "./vendor/*" ! -path "*/bindata.go")
|
GOFILES := $(shell find . -name "*.go" -type f ! -path "./vendor/*" ! -path "*/bindata.go")
|
||||||
GOFMT ?= gofmt -s
|
GOFMT ?= gofmt -s
|
||||||
|
NODE_BIN := $(PWD)/node_modules/.bin
|
||||||
|
|
||||||
GOFLAGS := -i -v
|
GOFLAGS := -i -v
|
||||||
EXTRA_GOFLAGS ?=
|
EXTRA_GOFLAGS ?=
|
||||||
|
@ -367,22 +368,24 @@ release-compress:
|
||||||
|
|
||||||
.PHONY: js
|
.PHONY: js
|
||||||
js:
|
js:
|
||||||
@hash npx > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@if ([ ! -d "$(NODE_BIN)" ]); then \
|
||||||
echo "Please install npm version 5.2+"; \
|
echo "node_modules directory is absent, please run 'npm install' first"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi;
|
fi;
|
||||||
npx eslint public/js
|
|
||||||
|
$(NODE_BIN)/eslint public/js
|
||||||
|
|
||||||
.PHONY: css
|
.PHONY: css
|
||||||
css:
|
css:
|
||||||
@hash npx > /dev/null 2>&1; if [ $$? -ne 0 ]; then \
|
@if ([ ! -d "$(NODE_BIN)" ]); then \
|
||||||
echo "Please install npm version 5.2+"; \
|
echo "node_modules directory is absent, please run 'npm install' first"; \
|
||||||
exit 1; \
|
exit 1; \
|
||||||
fi;
|
fi;
|
||||||
npx lesshint public/less/
|
|
||||||
npx -p less lessc --clean-css="--s0 -b" public/less/index.less public/css/index.css
|
$(NODE_BIN)/lesshint public/less/
|
||||||
$(foreach file, $(filter-out public/less/themes/_base.less, $(wildcard public/less/themes/*)),npx -p less lessc --clean-css="--s0 -b" public/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
|
$(NODE_BIN)/lessc --clean-css="--s0 -b" public/less/index.less public/css/index.css
|
||||||
npx postcss --use autoprefixer --no-map --replace public/css/*
|
$(foreach file, $(filter-out public/less/themes/_base.less, $(wildcard public/less/themes/*)),$(NODE_BIN)/lessc --clean-css="--s0 -b" public/less/themes/$(notdir $(file)) > public/css/theme-$(notdir $(call strip-suffix,$(file))).css;)
|
||||||
|
$(NODE_BIN)/postcss --use autoprefixer --no-map --replace public/css/*
|
||||||
|
|
||||||
@diff=$$(git diff public/css/*); \
|
@diff=$$(git diff public/css/*); \
|
||||||
if ([ ! -z "$CI" ] && [ -n "$$diff" ]); then \
|
if ([ ! -z "$CI" ] && [ -n "$$diff" ]); then \
|
||||||
|
|
Loading…
Reference in a new issue