Skip to content

Commit

Permalink
move after function down the chain, add remove utility fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Escalante committed Dec 19, 2013
1 parent a867a09 commit ccca28f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/api/init.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,17 @@ class Init extends Base
.then(get_user_config.bind(@))
.then(user_before_fn.bind(@))
.then(prompt_for_info.bind(@))
.then(user_after_fn.bind(@))
.then(update_template.bind(@))
.then(copy_template.bind(@))
.then(replace_ejs.bind(@))
.then(user_after_fn.bind(@))
.yield("project #{@template} created!")

# intended for use in the after function, quick way to remove
# files/folders that users wanted to nix after the prompts.
remove: (f) ->
fs.unlinkSync(path.resolve(@target, f))

#
# @api private
#
Expand Down

0 comments on commit ccca28f

Please sign in to comment.