-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgruntfile.js
65 lines (58 loc) · 1.4 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-contrib-uglify'); // Compress javascript files
grunt.loadNpmTasks('grunt-contrib-concat'); // Merge JS files
grunt.loadNpmTasks('grunt-contrib-cssmin'); // Compress CSS files
grunt.loadNpmTasks('grunt-contrib-compass'); // Handles SASS files and convert them into CSS
grunt.loadNpmTasks('grunt-contrib-watch'); // check if changes in project are done and perform task if changes are found
grunt.loadNpmTasks('grunt-contrib-clean'); // deletes created files ???
grunt.initConfig({
uglify : {
options: {
mangle: false
},
my_target: {
files: {
'js/base.min.js': ['components/js/mootools-core.js','components/js/main.js', 'components/js/scripts.js']
}
}
},
cssmin: {
minify: {
expand: true,
cwd: 'components/css/',
src: ['*.css', '!*.min.css'],
dest: 'css/',
ext: '.min.css'
}
},
compass : {
dev: {
options : {
noLineComments : true,
config : 'config.rb'
}
}
},
watch : {
options : {
livereload : true
},
scripts: {
files: ['components/js/*.js'],
tasks: ['uglify']
},
html: {
files: ['*.html']
},
sass :{
files : ['components/sass/*.scss'],
tasks : ['compass:dev']
},
cssmin : {
files : ['components/css/styles.css'],
tasks : ['cssmin:minify']
}
}
});
grunt.registerTask('default','watch');
}