-
Notifications
You must be signed in to change notification settings - Fork 4
/
Gruntfile.js
47 lines (44 loc) · 1.4 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
module.exports = function (grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
doctoc: {
options: {
bitbucket: false,
removeAd: true,
header: '## Table of Contents'
},
toc: {
options: {
target: './README.md'
}
}
},
jshint: {
options: {
reporter: require('jshint-stylish'),
jshintrc: true
},
main: '<%= pkg.name %>.js'
},
uglify: {
options: {
banner: '/*!\n' +
'* <%= pkg.description %>\n' +
'* <%= pkg.repository.url %>\n' +
'* Copyright (c) 2015-<%= grunt.template.today("yyyy") %> <%= pkg.author.name %>\n' +
'* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)\n' +
'* Version: <%= pkg.version %>\n' +
'*/\n'
},
build: {
src: '<%= pkg.name %>.js',
dest: '<%= pkg.name %>.min.js'
}
}
});
grunt.loadNpmTasks('grunt-doctoc');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-uglify');
// Default task(s).
grunt.registerTask('default', ['jshint','uglify']);
};