forked from mutualmobile/lavaca
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
110 lines (101 loc) · 2.35 KB
/
Gruntfile.js
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
module.exports = function(grunt) {
'use strict';
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
karma: {
run: {
configFile: '.karma.js',
singleRun: true,
reporters: ['dots'],
browsers: ['PhantomJS']
},
debug: {
configFile: '.karma.js',
reporters: ['dots'],
browsers: ['Chrome']
},
coverage: {
configFile: '.karma.js',
singleRun: true,
reporters: ['dots', 'coverage'],
browsers: ['PhantomJS'],
preprocessors: {
'src/**/*.js': ['coverage']
},
coverageReporter: {
type : 'lcov',
dir : 'test/coverage/'
}
}
},
coveralls: {
options: {
debug: true,
coverage_dir: 'test/coverage',
dryRun: false,
force: true,
recursive: true
}
},
jshint: {
src: {
options: {
jshintrc: '.jshintrc'
},
files: {
lavaca: 'src/**/*.js'
}
},
test: {
options: {
jshintrc: 'test/unit/.jshintrc'
},
files: {
src: 'test/unit/**/*.js'
}
}
},
yuidoc: {
compile: {
name: '<%= pkg.name %>',
description: '<%= pkg.description %>',
version: '<%= pkg.version %>',
url: '<%= pkg.homepage %>',
options: {
paths: 'src',
outdir: 'docs',
linkNatives: true,
themedir: 'libs/yuidoc/themes/default'
}
}
},
requirejs: {
baseUrl: 'src',
mainConfigFile: 'src/boot.js',
optimize: 'none',
keepBuildDir: true,
locale: "en-us",
useStrict: false,
skipModuleInsertion: false,
findNestedDependencies: false,
removeCombined: false,
preserveLicenseComments: false,
logLevel: 0
},
open : {
doc : {
path: 'docs/index.html'
}
}
});
// These plugins provide necessary tasks.
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-yuidoc');
grunt.loadNpmTasks('grunt-open');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-karma-coveralls');
// Default task.
grunt.registerTask('doc', ['yuidoc', 'open:doc']);
grunt.registerTask('test', ['karma:run']);
};