-
Notifications
You must be signed in to change notification settings - Fork 10
/
Gruntfile.js
executable file
·50 lines (49 loc) · 1.36 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
module.exports = function(grunt) {
grunt.initConfig({
sass: {
dist: {
files: {
'landing-page/public/css/style.css': 'landing-page/sass/style.scss'
}
}
},
uglify: {
my_target: {
files: {
/*'public/css/style.min.css' : ['public/css/style.css'], -- need cssmin for that*/
'landing-page/public/js/app.min.js' : ['public/js/app.js'],
}
}
},
cssmin: {
target: {
files: {
'landing-page/public/css/style.min.css' : ['landing-page/public/css/style.purified.css']
}
}
},
purifycss: {
target: {
src: ['landing-page/views/*.hbs'],
css: ['landing-page/public/css/style.css'],
dest: 'landing-page/public/css/style.purified.css'
},
},
watch: {
source: {
files: ['landing-page/sass/**/*.scss', 'landing-page/views/**/*.hbs', 'landing-page/js/**/*.js'],
tasks: ['sass','uglify','purifycss','cssmin'],
options: {
livereload: true
}
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-purifycss');
/*grunt.registerTask('purifycss', ['purifycss']);*/
grunt.registerTask('default', ['sass']);
};