-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGruntfile.js
More file actions
46 lines (41 loc) · 1.12 KB
/
Copy pathGruntfile.js
File metadata and controls
46 lines (41 loc) · 1.12 KB
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
module.exports = function (grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
options: {
jshintrc: '.jshintrc'
},
all: ['Gruntfile.js', 'js/*.js', '!js/vendor/*']
},
sass:{ // task
dist:{ // target
options:{// target options
style: 'compact' // nested, compact, compressed, expanded
},
files:{ // dictionary of files in 'destination' : 'source' format
'assets/css/main.css' : 'scss/main.scss'
}
}
},
uglify:{
all:{
files:{
'assets/js/prettygist.min.js': ['js/*.js', '!js/vendor/*.js']
}
}
},
watch:{
jshint: {
files: ['Gruntfile.js','scss/*.scss', 'js/*.js', '!js/prettygist.min.js'],
tasks: ['sass','jshint', 'uglify']
}
}
});
// Load the grunt plugins
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-uglify');
// Register the default tasks
grunt.registerTask('default', ['watch']);
};