forked from Skelware/node-file-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Gruntfile.js
66 lines (58 loc) · 1.38 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
module.exports = function(grunt) {
'use strict';
var fse = require('fs-extra');
var pkgJson = grunt.file.readJSON('package.json');
require('time-grunt')(grunt);
require('load-grunt-config')(grunt, {
init: true,
data: {
pkg: pkgJson
},
loadGruntTasks: {
config: pkgJson,
scope: 'devDependencies'
}
});
/**
* Asserts the codestyle of the source code.
*
* @task lint
* @runs eslint
*/
grunt.registerTask('lint', ['eslint']);
/**
* Generates documentation for the source code.
*
* @task doc
* @runs yuidoc
*/
grunt.registerTask('doc', ['yuidoc']);
/**
* Runs all unit tests defined by the specification.
*
* @task unit
* @runs jasmine_node
*/
grunt.registerTask('unit', function() {
fse.copySync('fixtures/', 'data/', {
clobber: true
});
grunt.task.run(['jasmine_node']);
});
/**
* Combines the lint and unit tasks to create a full test suite.
*
* @task test
* @runs lint
* @runs unit
*/
grunt.registerTask('test', ['lint', 'unit']);
/**
* The default Grunt operation combines the test and doc tasks.
*
* @task default
* @runs test
* @runs doc
*/
grunt.registerTask('default', ['test', 'doc']);
};