mirror of https://github.com/iSoron/uhabits.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
575 B
27 lines
575 B
test_bundle := build/bundles/test.js
|
|
node_modules := node_modules/.bin/mocha
|
|
|
|
$(node_modules):
|
|
npm install
|
|
|
|
core:
|
|
cd ../core; ./gradlew --quiet jsMainClasses jsTestClasses
|
|
cp ../core/build/classes/kotlin/js/*/*.js node_modules/
|
|
|
|
$(test_bundle): test/index.js core
|
|
mkdir -p build/bundles
|
|
npx webpack $< --silent --mode production --output $@
|
|
|
|
test: $(test_bundle) $(node_modules)
|
|
mkdir -p build/reports
|
|
npx mocha $@ --reporter xunit > build/reports/tests.xml
|
|
npx mocha $@
|
|
|
|
clean:
|
|
rm -rf build
|
|
|
|
distclean: clean
|
|
rm -rf node_modules
|
|
|
|
.PHONY: test clean distclean core
|