gulp.task "scripts", ->
bundle = browserify
entries: './src/app.coffee'
extensions: ['.coffee']
insertGlobals: true
bundle.transform coffeeify
.bundle()
.pipe plumber()
.pipe source "bundle.min.js"
.pipe buffer()
.pipe sourcemaps.init()
.pipe uglify()
.pipe sourcemaps.write()
.pipe gulp.dest "./build/js"
.on "end", browserSync.reload
.on "error", gutil.log
{
"name": "Name",
"description": "Description",
"main": "index.js",
"authors": [
"Author"
],
"license": "ISC",
"moduleType": [],
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"test",
"tests"
],
"dependencies": {
"jquery": "3.0.0-beta1",
"bootstrap": "v4.0.0-alpha.2",
"gsap": "greensock#^1.18.2",
"tether": "^1.1.1",
"font-awesome": "fontawesome#^4.5.0"
},
"overrides": {
"jquery": {
"main": [
"*/**/jquery.min.js"
]
},
"bootstrap": {
"main": [
"*/**/bootstrap.min.{js,css}"
]
},
"gsap": {
"main": [
"*/**/TweenMax.min.js"
]
},
"tether": {
"main": [
"*/**/tether.min.{js,css}"
]
},
"font-awesome": {
"main": [
"*/**/font-awesome.min.css",
"fonts/*.*"
]
}
}
}
gulp.task 'vendors', ->
jsFilter = gulpFilter '*.js',
restore: true
cssFilter = gulpFilter '*.css',
restore: true
fontFilter = gulpFilter '*.{otf,eot,svg,ttf,woff,woff2}',
restore: true
combiner(
gulp.src do mainBowerFiles
jsFilter
gulpIf isDevelopment, do sourcemaps.init
concat 'vendor.min.js'
gulpIf isDevelopment, do sourcemaps.write
gulp.dest path.build.js
).on 'error', handleError
combiner(
gulp.src do mainBowerFiles
cssFilter
gulpIf isDevelopment, do sourcemaps.init
concat 'vendor.min.css'
gulpIf isDevelopment, do sourcemaps.write
gulp.dest path.build.css
).on 'error', handleError
combiner(
gulp.src do mainBowerFiles
fontFilter
gulp.dest path.build.fonts
).on 'error', handleError