Makefile 859 Bytes
Newer Older
Jesús Espino's avatar
Jesús Espino committed
1
.PHONY: check-style clean pre-run test install flow
2

3
node_modules: package.json
4 5
	@if ! [ $(shell which npm) ]; then \
		echo "npm is not installed"; \
6 7 8
		exit 1; \
	fi

9
	@echo Getting dependencies using npm
10

11
	npm install --ignore-scripts
12

13
check-style: | pre-run node_modules
14 15
	@echo Checking for style guide compliance

16
	npm run check
17 18 19 20 21 22 23 24 25 26

clean:
	@echo Cleaning app

	rm -rf node_modules

pre-run:
	@echo Make sure no previous build are in the folder

	@rm -rf actions
27
	@rm -rf action_types
28 29 30 31 32 33
	@rm -rf client
	@rm -rf constants
	@rm -rf reducers
	@rm -rf selectors
	@rm -rf store
	@rm -rf utils
Brett McBride's avatar
Brett McBride committed
34
	@rm -rf lib
35

36
test: check-style flow
37
	npm test
38

Jesús Espino's avatar
Jesús Espino committed
39 40 41
flow: .flowinstall
	@echo Checking types

42
	npm run flow
Jesús Espino's avatar
Jesús Espino committed
43

44
.flowinstall: node_modules
Jesús Espino's avatar
Jesús Espino committed
45 46
	@echo Getting flow-typed packages

47
	npm run flow-typed install
Jesús Espino's avatar
Jesús Espino committed
48 49 50

	touch $@

51
install: node_modules
Brett McBride's avatar
Brett McBride committed
52 53

bundle:
54 55
	npm run build
	npm run webpack