Skip to content

Instantly share code, notes, and snippets.

@joshbrw
Created November 9, 2016 14:30
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 joshbrw/7aa200a94e7fee0f6cf3fe1f013fe8fd to your computer and use it in GitHub Desktop.
Save joshbrw/7aa200a94e7fee0f6cf3fe1f013fe8fd to your computer and use it in GitHub Desktop.
const gulp = require('gulp'),
imagemin = require('gulp-imagemin'),
browserify = require('browserify'),
babelify = require('babelify'),
source = require('vinyl-source-stream');
var inputPath = "resources/assets/",
outputPath = "public/assets/",
assets = {
js: inputPath + "js/main.js",
};
gulp.task('scripts', function () {
return browserify(assets.js, { debug: true })
.transform(babelify, { presets: ["es2015"] })
.bundle()
.on('error', function(err) { console.error(err); this.emit('end'); })
.pipe(source('master.js'))
.pipe(gulp.dest(outputPath + 'js/'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment