-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGruntfile.js
More file actions
66 lines (62 loc) · 2.16 KB
/
Gruntfile.js
File metadata and controls
66 lines (62 loc) · 2.16 KB
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
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
less: {
compile: {
files: {
"build/tmp/<%= pkg.name %>.css": "src/css/snaprfx.less"
}
}
},
cssmin: {
minify: {
files: {
'build/tmp/<%= pkg.name %>.min.css': ['build/tmp/<%= pkg.name %>.css']
}
}
},
concat: {
options: {
separator: ''
},
cssjs: {
src: ['src/css/css.head.js', 'build/tmp/<%= pkg.name %>.min.css', 'src/css/css.foot.js'],
dest: 'build/tmp/snaprfx.css.js'
}
},
'closure-compiler': {
compile: {
closurePath: '/usr/local/opt/closure-compiler/libexec/',
js: [
'src/libs/jpegmeta.js',
'src/snaprfx.core.js',
'src/snaprfx.utils.js',
'src/snaprfx.stickers.js',
'src/snaprfx.canvas.js',
'src/snaprfx.blender.js',
'src/snaprfx.filters.js',
'src/snaprfx.text.js',
'build/tmp/snaprfx.css.js'
],
jsOutputFile: 'build/<%= pkg.name %>.min.js',
//maxBuffer: 500,
options: {
compilation_level: 'SIMPLE_OPTIMIZATIONS',
language_in: 'ECMASCRIPT5',
externs: [
'src/libs/jquery-1.8.2.js'
]
},
noreport: true
}
},
clean: ["build/tmp"]
});
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-cssmin');
grunt.loadNpmTasks('grunt-closure-compiler');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.registerTask('default', ['less', 'cssmin', 'concat', 'closure-compiler', 'clean']);
};