forked from knledg/react-webpack-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
35 lines (28 loc) · 803 Bytes
/
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
WEBPACK = node_modules/webpack/bin/webpack.js
ESLINT = node_modules/.bin/eslint
.PHONY: clean build client lint test ghPages
build:
make clean
NODE_ENV=production $(WEBPACK) \
--config webpack.config.prod.js \
--verbose \
--display-chunks \
--bail
clean:
-rm -rf ./dist
client:
nf run node dev-server.js
lint:
$(ESLINT) --ext .js --ext .jsx .
test:
NODE_PATH=. NODE_ENV=test npm run test
## Used to create the gh-pages branch, can be deleted for forked projects
ghPages:
rm -rf ../react-webpack-skeleton-ghpages/*
make clean
NODE_ENV=production APP_NAME="React Webpack Skeleton" BASE_URL="http://knledg.github.io/react-webpack-skeleton/" $(WEBPACK) \
--config webpack.config.prod.js \
--verbose \
--display-chunks \
--bail
cp -R dist/* ../react-webpack-skeleton-ghpages