2020-03-15 10:52:02 +03:00
|
|
|
ifeq ($(OS),Windows_NT)
|
|
|
|
DETECTED_OS := Windows
|
|
|
|
else
|
|
|
|
DETECTED_OS := $(shell uname)
|
|
|
|
endif
|
|
|
|
|
|
|
|
.PHONY: dev build test clean
|
|
|
|
|
2020-03-24 08:37:47 +03:00
|
|
|
dev: app-deps dashboard-deps
|
2020-03-15 10:52:02 +03:00
|
|
|
yarn dev
|
|
|
|
|
|
|
|
test: test-app test-dashboard
|
|
|
|
|
|
|
|
lint:
|
|
|
|
yarn lint
|
|
|
|
|
|
|
|
test-app:
|
|
|
|
yarn test
|
|
|
|
|
|
|
|
deps: app-deps dashboard-deps
|
|
|
|
|
|
|
|
app-deps:
|
|
|
|
yarn install --frozen-lockfile
|
|
|
|
|
|
|
|
build: build-dashboard app-deps
|
|
|
|
yarn install
|
|
|
|
ifeq "$(DETECTED_OS)" "Windows"
|
|
|
|
yarn dist:win
|
|
|
|
else
|
|
|
|
yarn dist
|
|
|
|
endif
|
|
|
|
|
|
|
|
dashboard-deps:
|
|
|
|
cd dashboard && yarn install --frozen-lockfile
|
|
|
|
|
|
|
|
clean-dashboard:
|
|
|
|
rm -rf dashboard/build/ && rm -rf static/build/client
|
|
|
|
|
|
|
|
test-dashboard: dashboard-deps
|
|
|
|
cd dashboard && yarn test
|
|
|
|
|
2020-03-24 08:37:47 +03:00
|
|
|
build-dashboard: dashboard-deps clean-dashboard
|
|
|
|
cd dashboard && yarn build
|
2020-03-15 10:52:02 +03:00
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf dist/*
|