diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c527e11 --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +build: + # start build tasks + eslint src/js/** & + postcss -c config/postcss.json & + webpack --config config/webpack.config.js + +server: + # start watch tasks + esw src/js/** --watch & + postcss -c config/postcss.dev.json -m --watch & + webpack --config config/webpack.dev.config.js --watch & + + # open browser with live reload + browser-sync start --server public --files 'public/*.css, public/*.html, public/*.js' diff --git a/bin/build.sh b/bin/build.sh deleted file mode 100755 index 78f0175..0000000 --- a/bin/build.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# start build tasks -eslint src/js/** & -postcss -c config/postcss.json & -webpack --config config/webpack.config.js diff --git a/bin/server.sh b/bin/server.sh deleted file mode 100755 index f7dcfe7..0000000 --- a/bin/server.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -# start watch tasks -esw src/js/** & -postcss -c config/postcss.dev.json -m --watch & -webpack --config config/webpack.dev.config.js --watch & - -# open browser with live reload -browser-sync start --server public --files 'public/*.css, public/*.html, public/*.js' diff --git a/package.json b/package.json index d64bb33..0308859 100644 --- a/package.json +++ b/package.json @@ -11,6 +11,7 @@ "babel-core": "^6.5.2", "babel-loader": "^6.2.3", "babel-preset-es2015-webpack": "^6.3.14", + "browser-sync": "^2.11.1", "cssnano": "^3.5.2", "eslint": "^2.2.0", "eslint-watch": "^2.1.8", @@ -23,7 +24,7 @@ "webpack": "^2.0.7-beta" }, "scripts": { - "server": "./bin/server.sh", - "build": "./bin/build.sh" + "build": "make build", + "server": "make server" } }