-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
33 lines (30 loc) · 923 Bytes
/
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
var config = require('./config/config');
module.exports = function (grunt) {
grunt.initConfig({
mongoimport: {
options: {
db: config.db.name,
host: config.db.host,
port: config.db.port,
collections: [{
name: 'widgets',
file: 'data/widgets.json',
jsonArray: true,
drop: true
}]
}
},
exec: {
jshint_test: {
cmd: 'node_modules/jshint/bin/jshint --verbose app/ config/ app.js *.js'
},
jasmine_test: {
cmd: 'node node_modules/jasmine-node/lib/jasmine-node/cli.js --color --verbose --captureExceptions --forceexit spec'
}
}
});
grunt.loadNpmTasks('grunt-mongoimport');
grunt.loadNpmTasks('grunt-exec');
grunt.registerTask('default', ['mongoimport', 'exec:jshint_test', 'exec:jasmine_test']);
grunt.registerTask('test', ['exec:jshint_test', 'exec:jasmine_test']);
};