-
Notifications
You must be signed in to change notification settings - Fork 7
/
gulpfile.coffee
36 lines (29 loc) · 982 Bytes
/
gulpfile.coffee
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import gulp from 'gulp'
import autoprefixer from 'gulp-autoprefixer'
import compileCoffee from 'gulp-coffee'
import concat from 'gulp-concat'
import rename from 'gulp-rename'
import compileSass from 'gulp-sass'
import uglify from 'gulp-uglify'
export js = ->
gulp.src 'coffee/**/*.coffee', sourcemaps: true
.pipe compileCoffee()
.pipe concat 'application.js'
.pipe uglify()
.pipe rename extname: '.min.js'
.pipe gulp.dest 'output/js/'
export css = ->
gulp.src 'scss/**/*.scss', sourcemaps: true
.pipe compileSass().on 'error', compileSass.logError
.pipe autoprefixer()
.pipe rename extname: '.min.css'
.pipe gulp.dest 'output/css/'
export images = ->
gulp.src 'images/**/*'
.pipe gulp.dest 'output/img/'
export build = gulp.parallel js, css, images
export watch = ->
gulp.watch 'coffee/**/*.coffee', js
gulp.watch 'scss/**/*.scss', css
gulp.watch 'images/**/*', images
export default build