Created
November 9, 2016 14:30
-
-
Save joshbrw/7aa200a94e7fee0f6cf3fe1f013fe8fd 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
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