|
1 | | -module.exports = function(grunt) { |
2 | | - // Do grunt-related things in here |
3 | | - grunt.initConfig({ |
4 | | - pkg: grunt.file.readJSON('package.json'), |
| 1 | +module.exports = function (grunt) { |
| 2 | + // Do grunt-related things in here |
| 3 | + grunt.initConfig({ |
| 4 | + pkg: grunt.file.readJSON("package.json"), |
5 | 5 |
|
6 | | - jshint: { |
7 | | - files: ['Gruntfile.js', 'lib/**/*.js', 'test/**/*.js'], |
8 | | - options: { |
9 | | - // options here to override JSHint defaults |
10 | | - globals: { |
11 | | - jQuery: true, |
12 | | - console: true, |
13 | | - module: true, |
14 | | - document: true |
15 | | - } |
16 | | - } |
17 | | - }, |
18 | | - |
19 | | - |
20 | | - |
21 | | - mochacli: { |
22 | | - options: { |
23 | | - //reporter: 'nyan' |
24 | | - reporter: 'spec' |
25 | | - }, |
26 | | - all: ['test/**/*_test.js'] |
| 6 | + mochacli: { |
| 7 | + options: { |
| 8 | + //reporter: "nyan" |
| 9 | + reporter: "spec" |
| 10 | + }, |
| 11 | + all: ["test/**/*_test.js"] |
27 | 12 |
|
28 | | - }, |
| 13 | + }, |
29 | 14 |
|
| 15 | + docco: { |
| 16 | + debug: { |
| 17 | + src: ["lib/*.js", "test/**/*.js"], |
| 18 | + options: { |
| 19 | + output: "docs/" |
| 20 | + } |
| 21 | + } |
30 | 22 |
|
31 | | - concat: { |
32 | | - options: { |
33 | | - separator: ';' |
34 | | - }, |
35 | | - dist: { |
36 | | - src: ['lib/**/*.js'], |
37 | | - dest: 'dist/<%= pkg.name %>.js' |
38 | | - } |
39 | | - |
40 | | - }, |
41 | | - uglify: { |
42 | | - options: { |
43 | | - // the banner is inserted at the top of the output |
44 | | - banner: '/*! <%= pkg.name %> <%= grunt.template.today("dd-mm-yyyy") %> */\n' |
45 | | - }, |
46 | | - dist: { |
47 | | - files: { |
48 | | - 'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>'] |
49 | | - } |
50 | 23 | } |
51 | | - }, |
52 | | - |
53 | | - docco: { |
54 | | - debug: { |
55 | | - src: ['lib/*.js','test/**/*.js'], |
56 | | - options: { |
57 | | - output: 'docs/' |
58 | | - } |
59 | | - } |
60 | | - |
61 | | - } |
62 | | - }); |
63 | | - |
64 | | - grunt.loadNpmTasks('grunt-contrib-uglify'); |
65 | | - grunt.loadNpmTasks('grunt-contrib-concat'); |
66 | | - grunt.loadNpmTasks('grunt-contrib-jshint'); |
67 | | - grunt.loadNpmTasks('grunt-mocha-cli'); |
68 | | - grunt.loadNpmTasks('grunt-docco'); |
69 | | - grunt.registerTask('doc', ['docco']); |
| 24 | + }); |
| 25 | + grunt.loadNpmTasks("grunt-mocha-cli"); |
| 26 | + grunt.loadNpmTasks("grunt-docco"); |
| 27 | + grunt.registerTask("doc", ["docco"]); |
70 | 28 |
|
71 | | - grunt.registerTask('default', ['jshint','mochacli','concat','uglify']);// ['jshint', 'qunit', 'concat', 'uglify']); |
| 29 | + grunt.registerTask("default", ["mochacli", "doc"]); |
72 | 30 | }; |
73 | 31 |
|
0 commit comments