From bf8f1394a3b0fc0213ac069aa65b2407f1d0d090 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Thu, 28 Jan 2016 21:50:42 -0600 Subject: Removes uglify step --- gulpfile.js | 35 ++++++++++++----------------------- 1 file changed, 12 insertions(+), 23 deletions(-) (limited to 'gulpfile.js') diff --git a/gulpfile.js b/gulpfile.js index dcbfdc7..3c43529 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,28 +1,17 @@ -var gulp = require('gulp'); -var uglify = require('gulp-uglify'); -var concat = require('gulp-concat'); +'use strict'; + +let gulp = require('gulp'); +let concat = require('gulp-concat'); gulp.task('build', function() { gulp.src([ - 'lib/serpentity/serpentity.js', - 'lib/serpentity/entity.js', - 'lib/serpentity/node.js', - 'lib/serpentity/node_collection.js', - 'lib/serpentity/component.js', - 'lib/serpentity/system.js', - ]) - .pipe(uglify()) - .pipe(concat('serpentity.min.js')) - .pipe(gulp.dest('dist')) - - gulp.src([ - 'lib/serpentity/serpentity.js', - 'lib/serpentity/entity.js', - 'lib/serpentity/node.js', - 'lib/serpentity/node_collection.js', - 'lib/serpentity/component.js', - 'lib/serpentity/system.js', - ]) + 'lib/serpentity.js', + 'lib/serpentity/entity.js', + 'lib/serpentity/node.js', + 'lib/serpentity/node_collection.js', + 'lib/serpentity/component.js', + 'lib/serpentity/system.js' + ]) .pipe(concat('serpentity.js')) - .pipe(gulp.dest('dist')) + .pipe(gulp.dest('dist')); }); -- cgit From f77c12fd8d3f6c35ea61413d0544a0cd7030c849 Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Sun, 27 Mar 2016 23:24:47 -0600 Subject: Uses babel on build --- gulpfile.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'gulpfile.js') diff --git a/gulpfile.js b/gulpfile.js index 3c43529..edd97d0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,10 +1,11 @@ 'use strict'; -let gulp = require('gulp'); -let concat = require('gulp-concat'); +const Gulp = require('gulp'); +const Babel = require('gulp-babel'); +const Concat = require('gulp-concat'); -gulp.task('build', function() { - gulp.src([ +Gulp.task('build', function() { + Gulp.src([ 'lib/serpentity.js', 'lib/serpentity/entity.js', 'lib/serpentity/node.js', @@ -12,6 +13,9 @@ gulp.task('build', function() { 'lib/serpentity/component.js', 'lib/serpentity/system.js' ]) - .pipe(concat('serpentity.js')) - .pipe(gulp.dest('dist')); + .pipe(Babel({ + presets: ['es2015'] + })) + .pipe(Concat('serpentity.js')) + .pipe(Gulp.dest('dist')); }); -- cgit From 4c329508c3a6c56076c110cd4397fef0a219f7ce Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Sun, 27 Mar 2016 23:33:46 -0600 Subject: Adds the minifying process back --- gulpfile.js | 7 +++++++ package.json | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'gulpfile.js') diff --git a/gulpfile.js b/gulpfile.js index edd97d0..dcb689b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -3,6 +3,8 @@ const Gulp = require('gulp'); const Babel = require('gulp-babel'); const Concat = require('gulp-concat'); +const Rename = require('gulp-rename'); +const Uglify = require('gulp-uglify'); Gulp.task('build', function() { Gulp.src([ @@ -17,5 +19,10 @@ Gulp.task('build', function() { presets: ['es2015'] })) .pipe(Concat('serpentity.js')) + .pipe(Gulp.dest('dist')) + .pipe(Uglify()) + .pipe(Rename({ + suffix: '.min' + })) .pipe(Gulp.dest('dist')); }); diff --git a/package.json b/package.json index 1e37373..0b50871 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,9 @@ "babel-preset-es2015": "6.6.x", "gulp": "3.9.x", "gulp-babel": "6.1.x", - "gulp-concat": "2.6.x" + "gulp-concat": "2.6.x", + "gulp-rename": "1.2.x", + "gulp-uglify": "1.5.x" }, "engines": { "node": ">= 4.0.0" -- cgit