-
-
Notifications
You must be signed in to change notification settings - Fork 99
/
Gruntfile.js
81 lines (77 loc) · 2.04 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
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
scsslint: {
allFiles: [
'sass/*.scss', 'sass/base/*.scss', 'sass/helpers/*.scss', 'sass/framework/*.scss', 'sass/modules/*.scss', 'sass/theme/*.scss', 'sass/vendor/*.scss'
],
options: {
bundleExec: false,
config: '.scss-lint.yml',
reporterOutput: 'scss-lint-report.xml',
colorizeOutput: true,
maxBuffer: 'Infinite'
}
},
sass: { // Task
dist: { // Target
files: { // Dictionary of files
'css/wirefy.css': 'sass/wirefy.scss' // 'destination': 'source'
}
},
dev: { // Another target
options: {
style: 'compressed', // Dictionary of render options
includePaths: [
'sass/','base/', 'helpers/', 'framework/', 'modules/', 'theme/', 'vendor/'
]
}
}
},
uglify: {
build: {
src: 'js/plugins.js',
dest: 'js/plugins.min.js'
}
},
imagemin: {
dynamic: {
files: [{
expand: true,
cwd: 'img/',
src: ['**/*.{png,jpg,gif}'],
dest: 'img/'
}]
}
},
cssmin: {
minify: {
expand: true,
cwd: 'css/',
src: ['wirefy.css', '!wirefy.min.css'],
dest: 'css/',
ext: '.min.css'
}
},
concat: {
options: {
separator: ';'
},
js: {
src: [
'js/plugins.min.js',
'js/wirefy.js',
'js/helper.js',
],
dest: 'js/wirefy.min.js'
}
}
});
grunt.loadNpmTasks('grunt-scss-lint');
grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-imagemin');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.registerTask('default', ['sass', 'uglify', 'imagemin', 'cssmin', 'concat']);
};