-
-
Save EB-BartVanVliet/3c3a86dd8fcc54f24162158f1c6dc7dc to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var gulp = require('gulp'), | |
concat = require('gulp-concat'), | |
uglify = require('gulp-uglify'), | |
browserify = require('gulp-browserify'), | |
sourcemaps = require('gulp-sourcemaps'); | |
var paths = { | |
webroot: './wwwroot/' | |
}; | |
paths.js = paths.webroot + 'js/app/**/*.js'; | |
paths.minJs = paths.webroot + 'js/**/*.min.js'; | |
paths.es5 = paths.webroot + 'js/**/*.es5.js'; | |
gulp.task('build:app', function () { | |
return gulp.src([paths.js, '!' + paths.es5, '!' + paths.minJs], {base: '.'}) | |
.pipe(sourcemaps.init({loadMaps: true})) | |
.pipe(concat("bundle.js")) | |
.pipe(browserify({ | |
transform: ['babelify'] | |
})) | |
.pipe(uglify()) | |
.pipe(sourcemaps.write(".")) | |
.pipe(gulp.dest(paths.webroot + 'js/')) | |
.on('error', console.error); | |
}); |
This file contains hidden or 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
https://imgur.com/a/hqulpVZ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment