aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Loomans <noahloomans@gmail.com>2016-12-06 15:25:53 +0100
committerNoah Loomans <noahloomans@gmail.com>2016-12-06 15:25:53 +0100
commit863d43f5038cd3b660c2f5160cd56124fa09427b (patch)
tree7f2202a03e976eb809417ecb125fa26d1c91f2fe
parent0cb55c1877c027bc6197a02f4758820cae36cae0 (diff)
improved build system
-rw-r--r--gulpfile.js14
-rw-r--r--package.json13
2 files changed, 4 insertions, 23 deletions
diff --git a/gulpfile.js b/gulpfile.js
deleted file mode 100644
index bb38213..0000000
--- a/gulpfile.js
+++ /dev/null
@@ -1,14 +0,0 @@
-const gulp = require('gulp')
-const fs = require('fs')
-const browserify = require('browserify')
-
-gulp.task('scripts', function () {
- browserify({ entries: './public/javascripts/main.js', debug: true })
- .transform('babelify', {presets: ['es2015']})
- .bundle()
- .pipe(fs.createWriteStream('./public/javascripts/bundle.js'))
-})
-
-gulp.task('scripts:watch', function () {
- return gulp.watch(['./public/javascripts/**/*.js', '!./public/javascripts/bundle.js'], ['scripts'])
-})
diff --git a/package.json b/package.json
index c831f7c..2fa3650 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,9 @@
"private": true,
"scripts": {
"start": "node ./bin/www",
- "setup": "npm install && bower install"
+ "setup": "npm install && bower install",
+ "build-dev": "browserify -d -t [ babelify --presets [ es2015 ] ] -e ./public/javascripts/main.js > ./public/javascripts/bundle.js",
+ "build": "browserify -t [ babelify --presets [ es2015 ] ] -e ./public/javascripts/bundle.js | uglifyjs > ./public/javascripts/bundle.js"
},
"dependencies": {
"bluebird": "^3.4.6",
@@ -31,14 +33,7 @@
"babelify": "^7.3.0",
"bower": "^1.7.9",
"browserify": "^13.1.0",
- "gulp": "^3.9.1",
- "gulp-babel": "^6.1.2",
- "gulp-browserify": "^0.5.1",
- "vinyl-source-stream": "^1.1.0"
- },
- "engine": {
- "node": "*",
- "npm": "*"
+ "gulp": "^3.9.1"
},
"author": "Noah Loomans <noahloomans@gmail.com>",
"license": "MIT",