-
Notifications
You must be signed in to change notification settings - Fork 1
/
Gruntfile.js
91 lines (89 loc) · 1.99 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
module.exports = function (grunt) {
grunt.initConfig({
project: grunt.file.readJSON('package.json'),
shell: {
compileDocs: {
command: "./node_modules/sassdoc/bin/sassdoc src ./src/ -d docs"
}
},
connect: {
server: {
options: {
port: 8000,
base: './',
keepalive: true
}
}
},
bump: {
options: {
files: [
'package.json',
'bower.json',
],
commitFiles: [
'package.json',
'bower.json',
],
createTag: true,
tagName: 'v%VERSION%',
tagMessage: 'v%VERSION%',
commitMessage: 'v%VERSION%',
commit: true,
push: true,
pushTo: 'origin',
}
},
concat: {
options: {
banner: '/*! veRepo.scss <%= project.version %> | MIT License | https://github.com/varemenos/verepo */\n\n'
},
dist: {
src: [
'src/functions/_**.scss',
'src/prefixes/_**.scss',
'src/helpers/_**.scss',
'src/layout/_**.scss',
'src/modules/_**.scss',
],
dest: '_verepo.scss'
}
},
sass: {
options: {
unixNewlines: true
},
dist: {
options: {
style: 'compressed'
},
files: [{
'example/style.css': 'example/style.scss'
}]
}
},
autoprefixer: {
options: {
browsers: ["last 2 versions", "> 1%", "ie 8", "ie 9", "Firefox ESR"]
},
dist: {
src: 'example/style.css',
dest: 'example/style.css'
}
}
});
// load npm tasks
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-autoprefixer');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-bump');
// register custom tasks
grunt.registerTask('update-docs', ['shell:compileDocs']);
grunt.registerTask('update-dist', ['concat:dist']);
grunt.registerTask('update-example', ['sass:dist', 'autoprefixer']);
grunt.registerTask('update', ['update-docs', 'concat:dist', 'update-example']);
grunt.registerTask('default', 'update');
};