Skip to content

Instantly share code, notes, and snippets.

Created December 20, 2014 13:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/dfdde50e89f33eba6901 to your computer and use it in GitHub Desktop.
Save anonymous/dfdde50e89f33eba6901 to your computer and use it in GitHub Desktop.
gulp.task('bundle', ['lint'], function() {
return gulp
.src(['./src/js/main.js'])
// How to exclude angular.js from the to5()/ngAnnotate/uglify routine
// but include it in the bundle?
// .src(['./node_modules/angular/angular.js'])
.pipe(sourcemaps.init())
.pipe(to5())
.pipe(concat('main.js'))
.pipe(ngAnnotate())
.pipe(uglify())
.pipe(sourcemaps.write())
.pipe(gulp.dest('./endpoint/static/'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment