-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathgulpfile.coffee
44 lines (37 loc) · 1.08 KB
/
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
43
44
gulp = require 'gulp'
coffee = require 'gulp-coffee'
gutil = require 'gulp-util'
fs = require 'fs'
mocha = require 'gulp-mocha'
watch = require 'gulp-watch'
insert = require 'gulp-insert'
gulp.task 'default', ['coffee']
gulp.task 'watch', ->
gulp.watch('./src/**/*.coffee', ['default'])
gulp.watch('./test/fixtures/**/*.coffee', ['default'])
gulp.task 'coffee', ->
gulp
.src('./src/*.coffee')
.pipe(coffee(bare: true)
.on('error', gutil.log))
.pipe gulp.dest('./dist')
gulp
.src('./src/bin/closeheat.coffee')
.pipe(coffee(bare: true)
.on('error', gutil.log))
.pipe(insert.prepend('#!/usr/bin/env node\n\n'))
.pipe gulp.dest('./dist/bin')
gulp
.src('./test/fixtures/git/src/*.coffee')
.pipe(coffee(bare: true)
.on('error', gutil.log))
.pipe gulp.dest('./test/fixtures/git/dist')
gulp
.src('./test/fixtures/pusher/src/*.coffee')
.pipe(coffee(bare: true)
.on('error', gutil.log))
.pipe gulp.dest('./test/fixtures/pusher/dist')
gulp.task 'test', ->
gulp
.src('test/*.coffee', read: false)
.pipe(mocha())