-
Notifications
You must be signed in to change notification settings - Fork 6
/
Gruntfile.js
63 lines (60 loc) · 1.88 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
var processors = require('./lib/processors.js')
module.exports = function(grunt) {
grunt.initConfig({
clean: {
pre: ['./dist', '*.sublime-completions'],
post: ['./dist/*.css']
},
sass: { // Task
dist: { // Target
options: { // Target options
style: 'expanded',
sourceMap: true
},
files: { // Dictionary of files
'./dist/main.css': './node_modules/bf-solid/_lib/solid.scss' // 'destination': 'source'
}
}
},
postcss: {
"solid-classes": {
options: {
map: false,
processors: [
processors.solid_classes({
scope: ".html .meta.tag.inline .string.quoted",
}),
]
},
src: './dist/*.css'
},
"solid-variables": {
options: {
map: false,
syntax: require('postcss-scss'), // work with SCSS directly
processors: [
processors.solid_variables({
scope: ".source.css.scss .meta.property-value.scss",
}),
]
},
src: './node_modules/bf-solid/_lib/solid-helpers/_variables.scss'
},
"solid-rules-pre": {
options: {
map: false,
syntax: require('postcss-scss'), // work with SCSS directly
processors: [
processors.solid_rules_pre(),
]
},
src: ['./node_modules/bf-solid/_lib/*utilities*/*.scss']
}
}
});
grunt.loadNpmTasks('grunt-postcss');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('default', ['clean:pre', 'sass', 'postcss:solid-variables', 'postcss:solid-rules-pre', 'postcss:solid-classes', 'clean:post'])
grunt.registerTask('generate', ['default'])
}