-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrunt.js
120 lines (96 loc) · 2.01 KB
/
grunt.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
109
110
111
112
113
114
115
116
117
118
119
120
module.exports = function(grunt) {
grunt.loadTasks("grunt-stylus");
grunt.initConfig({
pkg: '<json:package.json>',
staging: 'intermediate',
output: 'publish',
exclude: '.git* build/** node_modules/** grunt-stylus grunt.js package.json *.md'.split(' '),
clean: {
staging: ['<config:staging>'],
output: ['<config:output>']
},
mkdirs: {
staging: '<config:exclude>'
},
concat: {
dist: {
src: [
// 'js/plugins.js',
// 'js/main.js'
],
dest: 'js/merged.js'
}
},
stylus: {
file: {
src: 'styles/app.styl',
dest: 'styles'
}
},
css: {
'styles/app.css': ['styles/app.css']
},
rev: {
// js: 'js/**/*.js',
css: 'styles/app.css',
img: 'img/**',
fonts: [
'fonts/**/*.eot',
'fonts/**/*.svg',
'fonts/**/*.ttf',
'fonts/**/*.woff'
]
},
usemin: {
css: ['**/*.css'],
html: ['index.html']
},
html: {
files: '<config:usemin.html>',
type: 'basics'
},
img: {
dist: '<config:rev.img>'
},
watch: {
files: '<config:lint.files>',
tasks: 'lint qunit'
},
meta: {
version: '0.1.0',
banner: '/*! <%= meta.name %> - v<%= pkg.version %> - <%= grunt.template.today("m/d/yyyy") %>\n'
+ '* <%= pkg.homepage %>\n'
+ '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;'
+ ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */'
},
lint: {
files: ['grunt.js', 'js/**/*.js', 'test/**/*.js']
},
qunit: {
files: ['test/**/*.html']
},
min: {
dist: {
src: 'js/merged.js',
dest: 'js/build.js'
}
},
rjs: {
appDir: '.',
baseUrl: 'js',
dir: 'appdirectory-build',
modules: [{
name: 'main',
exclude: 'Backbone Facebook jQuery Mustache Underscore'.split(' ')
}],
paths: {
Backbone: 'empty:',
Facebook: 'empty:',
jQuery: 'empty:',
Mustache: 'empty:',
Underscore: 'empty:'
}
}
});
grunt.registerTask('default', 'intro clean qunit mkdirs concat stylus css min rev usemin manifest html img copy');
};