Skip to content
This repository has been archived by the owner on Jan 3, 2019. It is now read-only.

Commit

Permalink
name default task dev
Browse files Browse the repository at this point in the history
also print all available tasks when help is passed in as an argument
  • Loading branch information
weilu committed Dec 22, 2014
1 parent 6d0c55f commit 2da48f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion build.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ task = process.argv.reduce(function(memo, arg) {
return arg
}
return memo
}, false) || 'default'
}, false) || 'dev'

if(task.indexOf('help') >= 0) {
return console.log("Available build tasks: " + Object.keys(require('./tasks')).sort().join(', '))
}

if(task === 'build') {
var children = collectTasks()
Expand Down
2 changes: 1 addition & 1 deletion tasks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var tasks = {
transifexPush: require('./transifex').push
}

tasks.default = function(){
tasks.dev = function(){
async.parallel([ tasks.scripts, tasks.loader, tasks.html, tasks.styles, tasks.images ], function(){
tasks.watch()
tasks.serve()
Expand Down

0 comments on commit 2da48f9

Please sign in to comment.