 gulp = require 'gulp'
 gutil = require 'gulp-util'
 gulpif = require 'gulp-if'
-assign = require 'lodash.assign'
 minifycss = require 'gulp-minify-css'
 sass = require 'gulp-sass'
 source = require 'vinyl-source-stream'


jsBundleFile = 'app-js.js'

gulp.task 'js', ->
  bundler.bundle()
    .pipe(source(jsBundleFile))
    .pipe(buffer())
    .pipe(gulpif(!argv.production, sourcemaps.init({loadMaps: true})))
      .pipe(gulpif(argv.production, uglify()))
    .pipe(gulpif(!argv.production, sourcemaps.write('./')))
    .pipe(gulp.dest('./dist/assets/js'))

gulp.task 'sass', ->
  gulp.src ['./app/**/*.scss']

argv = require('yargs').argv
assign = require 'lodash.assign'
autoprefixer = require 'gulp-autoprefixer'
browserify = require 'browserify'
buffer = require 'vinyl-buffer'
