-
Notifications
You must be signed in to change notification settings - Fork 0
/
gruntfile.js
56 lines (50 loc) · 1.71 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
chokidar: {
css: {
files: ['**/*.scss'],
tasks: ['sass', 'postcss'],
options: {
interrupt: true,
}
}
},
sass: {
options: {
sourceMap: true
},
dist: {
files: {
'./src/styles.css': './src/styles.scss',
'./src/app/app.component.css': './src/app/app.component.scss',
'./src/app/home-page/home-page.css': './src/app/home-page/home-page.scss',
'./src/app/hero-title/hero-title.css': './src/app/hero-title/hero-title.scss',
'./src/app/status-box/status-box.css': './src/app/status-box/status-box.scss',
'./src/app/sign-up-count/sign-up-count.css': './src/app/sign-up-count/sign-up-count.scss',
'./src/app/sign-up-form/sign-up-form.css': './src/app/sign-up-form/sign-up-form.scss',
}
}
},
postcss: {
options: {
map: true,
processors: [
// require('pixrem')(), // add fallbacks for rem units
require('autoprefixer')({browsers: 'last 2 versions'}), // add vendor prefixes
require('cssnano')() // minify the result
]
},
dist: {
src: [
'./src/app/**/*.css',
'./src/styles.css'
]
}
}
});
grunt.loadNpmTasks('grunt-chokidar');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-postcss');
grunt.registerTask('default', ['chokidar']);
};