forked from atom/node-ctags
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
60 lines (53 loc) · 1.47 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
coffee:
glob_to_multiple:
expand: true
cwd: 'src'
src: ['*.coffee']
dest: 'lib'
ext: '.js'
coffeelint:
options:
max_line_length:
level: 'ignore'
src: ['src/**/*.coffee']
test: ['spec/**/*.coffee']
gruntfile: ['Gruntfile.coffee']
cpplint:
files: ['src/**/*.cc']
reporter: 'spec'
verbosity: 1
filters:
build:
include: false
legal:
copyright: false
readability:
braces: false
shell:
rebuild:
command: 'npm build .'
options:
stdout: true
stderr: true
failOnError: true
test:
command: 'node_modules/.bin/jasmine-focused --captureExceptions --coffee spec'
options:
stdout: true
stderr: true
failOnError: true
grunt.loadNpmTasks('grunt-contrib-coffee')
grunt.loadNpmTasks('grunt-shell')
grunt.loadNpmTasks('grunt-coffeelint')
grunt.loadNpmTasks('node-cpplint')
grunt.registerTask 'clean', ->
rm = require('rimraf').sync
rm('lib')
rm('build')
grunt.registerTask('lint', ['coffeelint', 'cpplint'])
grunt.registerTask('default', ['lint', 'coffee', 'shell:rebuild'])
grunt.registerTask('test', ['default', 'shell:test'])
grunt.registerTask('prepublish', ['clean', 'coffee', 'lint', 'shell:rebuild'])