X-Git-Url: https://git.r.bdr.sh/rbdr/serpentity/blobdiff_plain/60a6915a0b24975e28a02b28e43d34f6dbb15625..6e4e4188e5e067aad7d228443d5bb512527c99b0:/gulpfile.js diff --git a/gulpfile.js b/gulpfile.js index dcbfdc7..edd97d0 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -1,28 +1,21 @@ -var gulp = require('gulp'); -var uglify = require('gulp-uglify'); -var concat = require('gulp-concat'); +'use strict'; -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')) +const Gulp = require('gulp'); +const Babel = require('gulp-babel'); +const Concat = require('gulp-concat'); - 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(concat('serpentity.js')) - .pipe(gulp.dest('dist')) +Gulp.task('build', function() { + Gulp.src([ + '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(Babel({ + presets: ['es2015'] + })) + .pipe(Concat('serpentity.js')) + .pipe(Gulp.dest('dist')); });