31 lines
774 B
Makefile
31 lines
774 B
Makefile
|
|
OSTYLES = $(wildcard src/style/*.less)
|
|
OSCRIPTS= $(wildcard src/script/*.coffee)
|
|
|
|
STYLES = $(OSTYLES:src/style/%.less=out/css/%.css)
|
|
SCRIPTS = $(OSCRIPTS:src/script/%.coffee=out/js/%.js)
|
|
|
|
all: prepare build
|
|
build: style script
|
|
dist: xpi
|
|
|
|
style: out/css/base.css
|
|
script: $(SCRIPTS)
|
|
|
|
prepare:
|
|
npm i lessc coffeescript
|
|
mkdir -p out
|
|
mkdir -p out/css
|
|
mkdir -p out/js
|
|
|
|
diskort.xpi xpi firefox: build
|
|
cp manifest.json out/
|
|
cd out; zip -r diskort.xpi manifest.json css js
|
|
@echo "goto about:config and set xpinstall.signatures.required to false"
|
|
@echo "then goto about:addons -> settings icon below search -> install add-on from file"
|
|
|
|
out/css/base.css: src/style/base.less $(OSTYLES)
|
|
npx lessc $< > $@
|
|
|
|
out/js/%.js: src/script/%.coffee
|
|
npx coffee --no-header -co $@ $<
|