-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
39 lines (33 loc) · 1.04 KB
/
Gruntfile.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
path = require 'path'
module.exports = (grunt) ->
grunt.initConfig(
coffee:
# Transpiles src/*.coffee to build/*.js
compile:
options:
bare: true
sourceMap: true
expand: true
flatten: false
cwd: 'src/'
src: '**/*.coffee'
dest: 'build'
ext: '.js'
mochaTest:
test:
src: 'test/**/*.coffee'
shell:
coffeelint:
command: -> path.normalize './node_modules/.bin/coffeelint .'
codo:
command: -> path.normalize './node_modules/.bin/codo'
)
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-mocha-test'
grunt.loadNpmTasks 'grunt-shell'
grunt.registerTask 'default', ['shell:coffeelint', 'mochaTest', 'coffee', 'shell:codo']
grunt.registerTask 'test', ['shell:coffeelint', 'mochaTest']
# Tasks to be run when gitlab-ci is running
grunt.registerTask 'ciTestset', ['shell:coffeelint', 'mochaTest', 'coffee']
# Create JS and documentation
grunt.registerTask 'prepublish', ['coffee', 'shell:codo']