-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgruntfile.js
43 lines (39 loc) · 1.21 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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['gruntfile.js', 'index.js', 'js/**/*.js'],
options: {
// options here to override JSHint defaults
globals: {
console: true,
module: true,
document: true
}
}
},
browserify: {
'dist/js/App.js': ['index.js']
},
less:{
'dist/css/App.css': ['less/app.less']
},
clean: ['dist/css', 'dist/js'],
uglify: {
my_target: {
files: {
'dist/js/App.min.js': ['dist/js/app.js']
}
}
}
});
//Tasks
grunt.registerTask('dist', ['jshint', 'less', 'browserify', 'uglify']); //Generates dist folder
// Load the plugins
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-browserify');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
};