-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
62 lines (49 loc) · 1.33 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# Common makefile commands & variables between projects
include .make/common.mk
## Set the distribution folder
ifndef DISTRIBUTIONS_DIR
override DISTRIBUTIONS_DIR=./release
endif
## Not defined? Use default repo name which is the application
ifeq ($(REPO_NAME),)
REPO_NAME="widget-react"
endif
## Not defined? Use default repo owner
ifeq ($(REPO_OWNER),)
REPO_OWNER="tonicpow"
endif
## Default branch
ifndef REPO_BRANCH
override REPO_BRANCH="master"
endif
.PHONY: audit
audit: ## Checks for vulnerabilities in dependencies
@npm audit
.PHONY: build
build: ## Builds the package for web distribution
@npm run build
.PHONY: clean
clean: ## Remove previous builds and any test cache data
@npm run clean
@if [ -d $(DISTRIBUTIONS_DIR) ]; then rm -r $(DISTRIBUTIONS_DIR); fi
@if [ -d build ]; then rm -r build; fi
@if [ -d build_cache ]; then rm -r build_cache; fi
@if [ -d node_modules ]; then rm -r node_modules; fi
.PHONY: install
install: ## Installs the dependencies for the package
@npm install
.PHONY: lint
lint: ## Runs the standard-js lint tool
@npm run lint
.PHONY: outdated
outdated: ## Checks for outdated packages via npm
@npm outdated
.PHONY: publish
publish: ## Will publish the version to npm
@npm run deploy
.PHONY: release
release:: ## Deploy to npm
@npm run deploy
.PHONY: test
test: ## Runs all tests
@npm run test