Last active
August 29, 2015 14:06
-
-
Save nickcherry/723fcdc3ba6e52f4b87b to your computer and use it in GitHub Desktop.
digital-platform-uglification
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/********************************************************************/ | |
/* Imports */ | |
/********************************************************************/ | |
var Gulp = require('gulp'); | |
var Concat = require('gulp-concat'); | |
var Uglify = require('gulp-uglify'); | |
/********************************************************************/ | |
/* Paths */ | |
/********************************************************************/ | |
var paths = {}; | |
paths.src = { | |
dir: 'modules/mobile/j2ee/jcp.war' | |
}; | |
paths.build = { | |
dir: 'modules/mobile/j2ee/jcp.war/build' | |
}; | |
paths.scripts = { | |
destFile: 'application.min.js' | |
, destDir: paths.build.dir + '/js' | |
, src: [ paths.src.dir + '/**/*.js' ] | |
}; | |
/********************************************************************/ | |
/* Gulp Tasks */ | |
/********************************************************************/ | |
Gulp.task('scripts', function() { | |
return Gulp.src(paths.scripts.src) | |
.pipe(Concat(paths.scripts.destFile)) | |
.pipe(Uglify({ mangle: false })) | |
.pipe(Gulp.dest(paths.scripts.destDir)); | |
}); | |
Gulp.task('default', ['scripts']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "digital-platform", | |
"version": "0.0.0", | |
"devDependencies": { | |
"gulp": "^3.8.8", | |
"gulp-concat": "^2.4.1", | |
"gulp-uglify": "^1.0.1" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment