-
Notifications
You must be signed in to change notification settings - Fork 9
/
Gruntfile.js
76 lines (68 loc) · 1.76 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
var fs = require('fs');
module.exports = function (grunt) {
grunt.initConfig({
concat: {
options: { separator: '\n\n' },
basic_and_extras: {
files: {
'temp/test.html': ['src/test.html', 'src/plugins/**/test.html'],
'temp/readme.md': ['src/readme.md', 'src/plugins/**/readme.md']
}
}
},
sass: {
dist: {
options: { sourcemap: 'none', style: 'compressed' },
files: {
'web/style/style.min.css': 'web/style/style.scss',
'mozui.min.css': 'src/mozui.scss'
}
},
dev: {
options: { sourcemap: 'none', style: 'nested' },
files: {
'mozui.css': 'src/mozui.scss'
}
}
},
copy: {
main: {
files: [
{ src: 'mozui.min.css', dest: 'releases/mozui.min.css' },
{ src: 'mozui.min.css', dest: 'releases/plugins.min.css' },
]
}
},
usebanner: {
taskName: {
options: {
position: 'top',
linebreak: true
},
files: { src: 'mozui.min.css' }
}
},
watch: {
scripts: {
files: [ 'package.js', 'Gruntfile.js', 'src/**/*.*', 'web/**/*.*' ],
tasks: ['default'],
options: { spawn: false },
}
},
bytesize: {
all: {
src: [
'mozui.min.css'
]
}
}
});
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-banner');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jade');
grunt.loadNpmTasks('grunt-bytesize');
grunt.registerTask('default', ['concat', 'sass', 'usebanner', 'copy', 'jade', 'bytesize']);
};