forked from jsbin/loop-protect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGruntfile.js
43 lines (37 loc) · 1011 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
'use strict';
module.exports = function (grunt) {
var config = {
jshint: {
options: {
reporter: require('jshint-stylish'),
jshintrc: true,
},
target: ['lib/loop-protect.js', 'test/*.test.js']
},
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
banner: '/*! <%= pkg.name %> | v<%= pkg.version %> | (c) <%= grunt.template.today("yyyy") %> <%= pkg.author %> | <%= pkg.licenses[0].url %> */\n',
compress: {
'global_defs': {
DEBUG: false
},
'dead_code': true
},
report: 'gzip'
},
dist: {
files: {
'dist/loop-protect.min.js': 'lib/loop-protect.js'
}
}
},
};
// Project configuration.
grunt.initConfig(config);
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
// Default task.
grunt.registerTask('dist', ['uglify']);
grunt.registerTask('default', ['jshint']);
};