-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.coffee
80 lines (68 loc) · 2.09 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Basic vInsight-lib-module configuration
module.exports = (grunt) ->
grunt.initConfig
pkg: grunt.file.readJSON('package.json')
coffeelint:
app: ["src/**/*.coffee"]
options:
max_line_length:
value: 1000
level: "error"
clean:
before:
src: ["coverage", "lib", "reports", "doc"]
spec:
src: ["spec-lib", "coverage/instrument"]
coffee:
compile:
options:
bare: true
files: [
{expand: true, cwd: './src', src: ['**/*.coffee'], dest: './lib', ext: '.js'},
{expand: true, cwd: './spec', src: ['**/*.coffee'], dest: './spec-lib', ext: '.spec.js'}
]
jasmine_node:
projectRoot: "./spec-lib"
jUnit:
report: true
savePath: "reports/"
useDotNotation: true
consolidate: false
instrument :
files : 'lib/*.js'
options :
basePath : './coverage/instrument/'
storeCoverage :
options :
dir : './coverage'
makeReport :
src : './coverage/*.json'
options :
type : 'cobertura'
dir : './coverage'
print : 'detail'
jsdoc:
dist:
src: ['lib/*.js'],
options:
destination: 'doc'
replace:
coverage:
options:
variables: '/lib/': '/coverage/instrument/lib/'
prefix: ''
files: [expand: true, cwd: './spec-lib', src: ['*.spec.js'], dest: './spec-lib', ext: '.spec.js']
watch:
scripts:
files: ['src/**/*.coffee','spec/**/*.coffee']
tasks: ['prod']
grunt.loadNpmTasks 'grunt-coffeelint'
grunt.loadNpmTasks 'grunt-contrib-clean'
grunt.loadNpmTasks 'grunt-contrib-coffee'
grunt.loadNpmTasks 'grunt-jasmine-node'
grunt.loadNpmTasks 'grunt-istanbul'
grunt.loadNpmTasks 'grunt-replace'
grunt.loadNpmTasks 'grunt-jsdoc'
grunt.loadNpmTasks 'grunt-contrib-watch'
grunt.registerTask 'prod', ['clean:before','coffee', 'instrument', 'replace:coverage', 'jasmine_node', 'storeCoverage', 'makeReport', 'clean:spec', 'jsdoc']
grunt.registerTask 'dev', ['prod','watch']