-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathGruntfile.js
48 lines (43 loc) · 1.01 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
module.exports = function(grunt) {
// Configuration
grunt.initConfig({
sass: {
dist: {
options: {
style: 'nested',
precision: 5,
},
files: {
'src/static/css/harmonypay.css': 'src/static/css/scss/harmonypay.scss',
}
}
},
postcss: {
options: {
processors: [
require('autoprefixer')({
overrideBrowserslist: ['> 0.5%, last 2 versions, Firefox ESR, not dead']
})
]
},
dist: {
src: 'src/static/css/harmonypay.css'
}
},
watch: {
scripts: {
files: ['src/static/css/scss/*.scss'],
tasks: ['sass', 'postcss'],
},
},
});
// Load plugins
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('@lodder/grunt-postcss');
grunt.loadNpmTasks('grunt-contrib-watch');
// Register Tasks
grunt.registerTask('compile-sass', ['sass']);
grunt.registerTask('prefix-css', ['postcss']);
// Run All Tasks
grunt.registerTask('all', ['compile-sass', 'prefix-css']);
};