1 require! <[./build fs ./config]>
2 module.exports = (grunt)->
3 grunt.loadNpmTasks \grunt-contrib-clean
4 grunt.loadNpmTasks \grunt-contrib-copy
5 grunt.loadNpmTasks \grunt-contrib-uglify
6 grunt.loadNpmTasks \grunt-contrib-watch
7 grunt.loadNpmTasks \grunt-livescript
8 grunt.loadNpmTasks \grunt-karma
10 pkg: grunt.file.readJSON './package.json'
12 files: '<%=grunt.option("path")%>.min.js': '<%=grunt.option("path")%>.js'
14 mangle: {+sort, +keep_fnames}
15 compress: {+pure_getters, +keep_fargs, +keep_fnames}
18 livescript: src: files:
19 './tests/helpers.js': './tests/helpers/*'
20 './tests/tests.js': './tests/tests/*'
21 './tests/library.js': './tests/library/*'
22 './tests/es.js': './tests/tests/es*'
23 './tests/experimental.js': './tests/experimental/*'
24 './build/index.js': './build/build.ls*'
29 src: <[es5/** es6/** es7/** stage/** web/** core/** fn/** index.js shim.js]>
37 cwd: './modules/library/'
39 dest: './library/modules/'
45 files: './tests/tests/*'
49 configFile: './tests/karma.conf.js'
50 browsers: <[PhantomJS]>
53 'library': files: <[client/library.js tests/helpers.js tests/library.js]>map -> src: it
54 grunt.registerTask \build (options)->
57 modules: (options || 'es5,es6,es7,js,web,core')split \,
58 blacklist: (grunt.option(\blacklist) || '')split \,
59 library: grunt.option(\library) in <[yes on true]>
60 umd: grunt.option(\umd) not in <[no off false]>
63 grunt.option(\path) || grunt.option(\path, './custom')
64 fs.writeFile grunt.option(\path) + '.js', it, done
68 grunt.registerTask \client ->
69 grunt.option \library ''
70 grunt.option \path './client/core'
71 grunt.task.run <[build:es5,es6,es7,js,web,core uglify]>
72 grunt.registerTask \library ->
73 grunt.option \library 'true'
74 grunt.option \path './client/library'
75 grunt.task.run <[build:es5,es6,es7,js,web,core uglify]>
76 grunt.registerTask \shim ->
77 grunt.option \library ''
78 grunt.option \path './client/shim'
79 grunt.task.run <[build:es5,es6,es7,js,web uglify]>
80 grunt.registerTask \e ->
81 grunt.option \library ''>
82 grunt.option \path './client/core'
83 grunt.task.run <[build:es5,es6,es7,js,web,core,exp uglify]>
84 grunt.registerTask \default <[clean copy client library shim]>