forked from leonidas/transparency
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJamesfile.coffee
28 lines (21 loc) · 869 Bytes
/
Jamesfile.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
james = require 'james'
coffee = require 'james-coffee'
uglify = require 'james-uglify'
browserify = require 'browserify'
coffeeify = require 'coffeeify'
james.task 'build', ->
js = james.list('src/**/*.coffee').map (filename) ->
james.read(filename)
.transform(coffee bare: true)
.write filename.replace(/src/, 'lib').replace(/\.coffee/, '.js')
james.wait(js).then ->
dist = james.read browserify('./lib/transparency.js').bundle()
dist.write 'dist/transparency.js'
dist.transform(uglify).write 'dist/transparency.min.js'
james.list('spec/**/*.coffee').map (filename) ->
james.read(filename)
.transform(coffee filename: filename)
.write filename.replace /\.coffee$/, '.js'
james.task 'watch', ->
james.watch '*/**/*.coffee', -> james.run 'build'
james.task 'default', ['build']