forked from js-cookie/js-cookie
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Cakefile
37 lines (31 loc) · 818 Bytes
/
Cakefile
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
use 'sake-bundle'
use 'sake-outdated'
use 'sake-publish'
use 'sake-version'
task 'clean', 'clean project', ->
exec 'rm -rf lib'
task 'build', 'build project', ->
b = new Bundle
entry: 'src/index.coffee'
compilers:
coffee: version: 1
Promise.all [
b.write format: 'es'
b.write
format: 'cjs'
include: ['es-is']
b.write
format: 'web'
dest: 'cookies.js'
external: false
moduleName: 'Cookies'
sourceMap: 'inline'
]
task 'build:min', 'build minified version', ['build'], ->
exec 'uglifyjs cookies.js -o cookies.min.js'
task 'watch', 'watch project', ->
watch 'src/*.coffee', (filename) ->
console.log filename, 'modified, rebuilding'
invoke 'build' if not running 'build'
task 'test', 'run tests', ->
exec 'qunit'