2021-05-13 19:45:57 +00:00
|
|
|
# Not including dev commands as they have issues on Window's Powershell.
|
|
|
|
|
|
|
|
# Fixing paths for different platforms
|
|
|
|
# https://stackoverflow.com/questions/4058840/makefile-that-distincts-between-windows-and-unix-like-systems
|
|
|
|
ifdef OS
|
|
|
|
RM = del /Q
|
|
|
|
FixPath = $(subst /,\,$1)
|
|
|
|
else
|
|
|
|
ifeq ($(shell uname), Linux)
|
|
|
|
RM = rm -f
|
|
|
|
FixPath = $1
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
SEP ?= '\'
|
|
|
|
|
|
|
|
# Stands for MODULES_BINARIES, abbreviated to pollute less possible the commands
|
|
|
|
M_B ?= $(call FixPath, ./node_modules/.bin/)
|
2021-04-03 17:46:54 +00:00
|
|
|
|
|
|
|
lint:
|
2021-05-13 19:45:57 +00:00
|
|
|
$(M_B)eslint "./{src, tests}/**" --fix
|
2021-04-03 17:46:54 +00:00
|
|
|
|
2021-06-01 20:56:01 +00:00
|
|
|
lint-build:
|
|
|
|
$(M_B)eslint "./src/**" --fix
|
|
|
|
|
2021-04-24 16:03:27 +00:00
|
|
|
test:
|
2021-05-13 19:45:57 +00:00
|
|
|
$(M_B)jest
|
2021-04-24 16:03:27 +00:00
|
|
|
|
2021-06-01 20:56:01 +00:00
|
|
|
build: lint-build test
|
2021-05-13 19:45:57 +00:00
|
|
|
$(M_B)tsc
|