-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.coffee
42 lines (32 loc) · 958 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
37
38
39
40
41
42
# coffeelint: disable=max_line_length
gulp = require 'gulp'
$ = (require 'gulp-load-plugins')()
run = require 'run-sequence'
onError = (error) ->
$.util.log error
process.exit 1
# build
gulp.task 'lint', ->
gulp.src ['./gulpfile.coffee', './src/**/*.coffee', './test/**/*.coffee']
.pipe $.coffeelint()
.pipe $.coffeelint.reporter()
.pipe $.coffeelint.reporter 'failOnWarning'
gulp.task 'test', ['lint'], ->
gulp.src ['./test/**/*.coffee', '!./test/**/*-benchmark.coffee']
.pipe $.mocha()
.on 'error', onError
gulp.task 'perf', ->
gulp.src './test/**/*-benchmark.coffee'
.pipe $.mocha()
.on 'error', onError
gulp.task 'compile', ->
gulp.src './src/**/*.coffee'
.pipe $.coffee bare: yes
.on 'error', onError
.pipe gulp.dest './lib'
gulp.task 'clean',
require 'del'
.bind null, ['lib']
gulp.task 'build', (done) ->
run 'clean', 'test', 'perf', 'compile', done
gulp.task 'default', ['build']