forked from lancespeelmon/winston-syslog-posix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gulpfile.coffee
39 lines (32 loc) · 965 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
del = require 'del'
gulp = require 'gulp'
gutil = require 'gulp-util'
coffee = require 'gulp-coffee'
sourcemaps = require 'gulp-sourcemaps'
coffeelint = require 'gulp-coffeelint'
mocha = require 'gulp-mocha'
jsFiles = ['lib/**/*.js']
specFiles = ['spec/**/*.coffee']
coffeeFiles = ['src/**/*.coffee']
testFiles = jsFiles
buildFiles = ['lib', 'coverage']
gulp.task 'clean', ->
del.sync buildFiles
gulp.task 'lint', ->
gulp.src coffeeFiles
.pipe coffeelint()
.pipe coffeelint.reporter()
.pipe coffeelint.reporter('fail') # fail task
gulp.task 'coffee', ['lint'], ->
gulp.src coffeeFiles
.pipe sourcemaps.init()
.pipe coffee({bare: true}).on('error', gutil.log)
.pipe sourcemaps.write()
.pipe gulp.dest './lib/'
gulp.task 'build', ['coffee']
gulp.task 'test', ['coffee'], ->
gulp.src testFiles
.on 'finish', ->
gulp.src specFiles
.pipe mocha reporter: 'nyan'
gulp.task 'default', ['clean', 'test']