build: Build js files with webpack

This commit is contained in:
Cole Bemis
2017-07-03 15:06:40 -07:00
committed by Cole Bemis
parent 71f502fc95
commit ef3e69b327
3 changed files with 41 additions and 0 deletions

View File

@@ -1,3 +1,12 @@
src_files := src/*.js
src_dir := src
.PHONY: all build
all: build
build: dist/feather.js dist/feather.min.js
node_modules:
npm install
@@ -6,3 +15,9 @@ dist:
dist/icons.json: node_modules dist icons icons/*.svg
./node_modules/.bin/babel-node bin/build-json.js
dist/feather.js: dist/icons.json $(src_dir) $(src_files)
./node_modules/.bin/webpack --output-filename feather.js
dist/feather.min.js: dist/icons.json $(src_dir) $(src_files)
./node_modules/.bin/webpack --output-filename feather.min.js -p