mirror of
https://github.com/hrfee/jfa-go.git
synced 2026-01-18 16:47:42 +01:00
scripts: replace dark-variant.sh with go scripts/variants
uses regex mostly, resulting in a significantly faster execution (old: ~2s, new: ~31ms). Only matches classList.add/remove and class="..." (won't touch string literal variables or colours), but these weren't really used anyway. Supports multi-line classList.add/remove, which was the reason I wrote this anyway (formatting the codebase introduced some of these).
This commit is contained in:
9
Makefile
9
Makefile
@@ -142,11 +142,14 @@ TYPESCRIPT_TEMPSRC = $(TYPESCRIPT_SRC:ts/%=tempts/%)
|
||||
TYPESCRIPT_TARGET = $(DATA)/web/js/admin.js
|
||||
$(TYPESCRIPT_TARGET): $(TYPESCRIPT_FULLSRC) ts/tsconfig.json
|
||||
$(TYPECHECK)
|
||||
# rm -rf tempts
|
||||
# cp -r ts tempts
|
||||
rm -rf tempts
|
||||
cp -r ts tempts
|
||||
mkdir -p tempts
|
||||
$(adding dark variants to typescript)
|
||||
scripts/dark-variant.sh tempts
|
||||
scripts/dark-variant.sh tempts/modules
|
||||
# scripts/dark-variant.sh tempts
|
||||
# scripts/dark-variant.sh tempts/modules
|
||||
go run scripts/variants/main.go -dir ts -out tempts
|
||||
$(info compiling typescript)
|
||||
$(foreach tempsrc,$(TYPESCRIPT_TEMPSRC),$(ESBUILD) --target=es6 --bundle $(tempsrc) $(SOURCEMAP) --outfile=$(patsubst %.ts,%.js,$(subst tempts/,./$(DATA)/web/js/,$(tempsrc))) $(MINIFY);)
|
||||
$(COPYTS)
|
||||
|
||||
Reference in New Issue
Block a user