Skip to content

Commit 48ff526

Browse files
committed
Update Gruntfile.js.
* add "dist" alias for "build" * add line breaks between targets * rename target and remove unneeded arrays
1 parent 24bf49a commit 48ff526

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

Gruntfile.js

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,16 @@ module.exports = function(grunt) {
5151
"<%= clone %>",
5252
"<%= csslint_files %>"
5353
],
54+
5455
// Task configuration.
5556
clean: {
5657
dist: "<%= build_dir %>"
5758
},
59+
5860
changelog: {
5961
dest: "CHANGELOG"
6062
},
63+
6164
concat: {
6265
core: {
6366
options: {
@@ -129,6 +132,7 @@ module.exports = function(grunt) {
129132
dest: "<%= build_dir %>/<%= pkg.name %>-wsh.js"
130133
}
131134
},
135+
132136
includereplace: {
133137
dist: {
134138
options: {
@@ -147,44 +151,48 @@ module.exports = function(grunt) {
147151
}]
148152
}
149153
},
154+
150155
jshint: {
151156
options: {
152157
jshintrc: ".jshintrc"
153158
},
154159
gruntfile: {
155160
src: ["Gruntfile.js", "tasks/*.js"]
156161
},
162+
core: {
163+
src: "src/**/*.js"
164+
},
157165
demo: {
158166
src: "demos/*.js"
159167
},
160-
all: {
161-
src: "src/**/*.js"
162-
},
163168
tests: {
164169
src: "tests/**/*.js"
165170
}
166171
},
172+
167173
watch: {
168174
gruntfile: {
169175
files: "<%= jshint.gruntfile.src %>",
170-
tasks: ["jshint"]
176+
tasks: "jshint"
171177
},
172178
src: {
173179
files: "<%= jshint.all.src %>",
174-
tasks: ["jshint:all"]
180+
tasks: "jshint:core"
175181
},
176182
lib_test: {
177183
files: "<%= jshint.tests.src %>",
178-
tasks: ["jshint:tests"]
184+
tasks: "jshint:tests"
179185
}
180186
},
187+
181188
yuitest: {
182189
tests: {
183190
src: [
184191
"tests/**/*.js"
185192
]
186193
}
187194
},
195+
188196
test_rhino: {
189197
tests: {
190198
src: [
@@ -208,7 +216,8 @@ module.exports = function(grunt) {
208216
grunt.registerTask("build", ["clean", "concat", "includereplace"]);
209217

210218
//Alias for
211-
grunt.registerTask("lint", ["jshint"]);
219+
grunt.registerTask("dist", "build");
220+
grunt.registerTask("lint", "jshint");
212221

213222
// Testing
214223
grunt.registerTask("test", ["build", "jshint", "yuitest"]);

0 commit comments

Comments
 (0)