-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
47 lines (37 loc) · 971 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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
module.exports = function(grunt) {
grunt.initConfig({
// Add package.json as an object for config
pkg: grunt.file.readJSON('package.json'),
// JSHint - Lint files for development
jshint: {
options: {
jshintrc: ".jshintrc"
},
files: ["Gruntfile.js", "jsonp-sec.js", "test/qunit/tests/**/*.js"]
},
// QUnit test runner
qunit: {
all: ["test/qunit/index.html"]
},
// YUIDoc task
yuidoc: {
compile: {
name: '<%= pkg.name %>',
description: '<%= pkg.name %>',
version: '<%= pkg.version %>',
url: '<%= pkg.homepage %>',
options: {
exclude: 'bower_components,node_modules,test,vendor',
paths: './',
outdir: 'docs/'
}
}
}
});
grunt.registerTask("default", ["test"]);
grunt.registerTask("test", ["jshint", "qunit"]);
// Load npm modules for tasks
grunt.loadNpmTasks("grunt-contrib-qunit");
grunt.loadNpmTasks("grunt-contrib-jshint");
grunt.loadNpmTasks("grunt-contrib-yuidoc");
};