forked from eltimn/jquery-bs-alerts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
49 lines (44 loc) · 1.3 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
module.exports = function(grunt) {
"use strict";
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
main: "docs/js/jquery.<%= pkg.name %>.js"
},
uglify: {
options: {
banner: '/*! <%= pkg.name %> version: <%= pkg.version %>\n* <%= grunt.template.today("yyyy-mm-dd") %>\n* Author: Tim Nelson\n* Website: http://eltimn.github.com/jquery-bs-alerts\n* MIT License http://www.opensource.org/licenses/mit-license.php\n*/\n'
},
build: {
src: 'docs/js/jquery.<%= pkg.name %>.js',
dest: 'build/jquery.<%= pkg.name %>.min.js'
}
},
compress: {
docs: {
options: {
archive: 'docs.zip'
},
files: [
{expand: true, cwd: 'docs/', src: ['**'], dest: '/'}
]
}
},
watch: {
main: {
files: '<%= jshint.main %>',
tasks: ['jshint']
}
}
});
// Load the plugin that provides the "uglify" task.
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compress');
// Tasks
grunt.registerTask('build', ['jshint', 'uglify']);
// Default task(s).
grunt.registerTask('default', ['build']);
};