-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathGruntfile.js
42 lines (37 loc) · 932 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
module.exports = function (grunt) {
'use strict';
require('load-grunt-tasks')(grunt);
var config = {
src: 'src',
dist: 'dist'
};
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
config: config,
uglify: {
options: {
banner: '/*! Saveba.js <%= pkg.version %> | Aurelio De Rosa (@AurelioDeRosa) | MIT/GPL-3.0 Licensed */\n'
},
dist: {
files: {
'<%= config.dist %>/saveba.min.js': ['<%= config.src %>/saveba.js']
}
}
},
jshint: {
files: ['Gruntfile.js', 'src/**/*.js'],
options: {
jshintrc: '.jshintrc',
reporter: require('jshint-stylish')
}
},
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint']
}
});
grunt.registerTask('default', [
'jshint',
'uglify'
]);
};