This repository has been archived by the owner on Apr 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 49
/
Gruntfile.js
108 lines (105 loc) · 3.39 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
brixjs: {
brixjs: {
files: {
"dist/<%= pkg.version %>/": "src/"
}
}
},
brixless: {
brixless: {
files: {
'dist/<%= pkg.version %>/': 'src/style/',
'src/style/': 'src/style/'
}
}
},
galleryjs: {
gallery: {
files: {
'dist/<%= pkg.version %>/gallery/': 'src/gallery/'
}
}
},
galleryless: {
galleryless: {
files: {
'dist/<%= pkg.version %>/gallery/': 'src/gallery/'
}
}
},
chartsjs:{
chartsjs:{
files:{
'dist/<%= pkg.version %>/gallery/charts/':'src/gallery/charts/'
}
}
},
watch: {
watchbrixjs: {
files: 'src/core/*.js',
tasks: ['brixjs']
},
watchgalleryless: {
files: 'src/gallery/**/*.less',
tasks: ['galleryless']
},
watchgalleryjs: {
files: 'src/gallery/**/*.js',
tasks: ['galleryjs']
},
watchbrixless: {
files: 'src/style/*.less',
tasks: ['brixless']
}
},
jshint: {
files: ['Gruntfile.js', 'src/core/brix.js', 'src/core/tmpler.js', 'src/core/dataset.js', 'src/core/chunk.js', 'src/core/brick.js', 'src/core/pagelet.js', 'src/core/demolet.js'],
options: {
browser: true,
curly: true,
eqeqeq: false,
immed: true,
latedef: true,
newcap: false,
noarg: true,
sub: true,
undef: true,
boss: true,
eqnull: true,
evil: true,
expr: true,
laxcomma: true,
globals: {
exports: true,
module: false,
KISSY: true,
console: true,
print: true,
document: true,
window: true,
Brix:true
}
}
},
curl: {
'dist/fonts/uxiconfont.ttf': 'http://ux.etao.com/assets/src_uxiconfont.ttf',
'dist/fonts/uxiconfont.woff': 'http://ux.etao.com/assets/src_uxiconfont.woff',
'dist/fonts/uxiconfont.svg': 'http://ux.etao.com/assets/src_uxiconfont.svg',
'dist/fonts/uxiconfont.eot': 'http://ux.etao.com/assets/src_uxiconfont.eot'
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-curl');
//tasks
grunt.loadTasks('tasks');
// Default task.
//grunt.registerTask('default', ['chartsjs']);
grunt.registerTask('default', ['jshint','brixjs' ,'brixless','galleryless', 'galleryjs' ,'chartsjs', 'watch']);
};