-
Notifications
You must be signed in to change notification settings - Fork 46
/
Gruntfile.js
78 lines (70 loc) · 2.45 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
module.exports = function(grunt) {
grunt.initConfig({
paths: {
scss: './scss',
css: './assets/css'
},
buildType: 'Build',
pkg: grunt.file.readJSON('package.json'),
archive_name: grunt.option('name') || 'linen',
clean: {
pre: ['dist/', 'build/'],
post: ['<%= archive_name %>.zip']
},
compress: {
main: {
options: {
archive: '<%= archive_name %>.zip'
},
expand: true,
cwd: 'build/',
src: ['**/*'],
dest: ''
}
},
copy: {
main: {
files: [
{expand: true, src: ['assets/css/**'], dest: 'build/'},
{expand: true, src: ['assets/fonts/**'], dest: 'build/'},
{expand: true, src: ['assets/images/**'], dest: 'build/'},
{expand: true, src: ['assets/js/**'], dest: 'build/'},
{expand: true, src: ['partials/**'], dest: 'build/'},
{expand: true, src: ['scss/**'], dest: 'build/'},
{expand: true, src: ['*', '!.gitignore', '!.DS_Store'], dest: 'build/'}
]
},
archive: {
files: [
{expand: true, src: ['<%= archive_name %>.zip'], dest: 'dist/'}
]
}
},
sass: {
admin: {
options : {
// Only enable sourcemaps if you have Sass 3.3 installed.
// sourcemap: true
},
files: {
'<%= paths.css %>/style.css': '<%= paths.scss %>/style.scss',
'<%= paths.css %>/ie.css': '<%= paths.scss %>/ie.scss'
}
}
},
watch: {
sass: {
files: './scss/**/*.scss',
tasks: ['sass:admin']
}
}
});
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-compress');
grunt.loadNpmTasks('grunt-contrib-copy');
//grunt.loadNpmTasks('grunt-contrib-sass');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.registerTask('default', ['sass:admin']);
grunt.registerTask('bundle', ['clean:pre', 'copy:main', 'compress', 'copy:archive', 'clean:post']);
};