Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making create.js more extensible #92

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
9 changes: 7 additions & 2 deletions lib/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,13 @@ var createDirs = function(options, callback) {
});
};

exports.init = function(options, callback) {
var init = function(options, callback) {
var start = (new Date()).getTime();
log.info('creating module (' + options.name + ') in: ' + options.location);
if (util.exists(options.location)) {
log.bail('destination already exists, you are on your own! bailing..');
}

createDirs(options, function() {
util.tree(options.location, options.root, function(tree) {
log.log('');
Expand All @@ -165,3 +165,8 @@ exports.init = function(options, callback) {
});
};

module.exports = {
init: init,
createJSON: createJSON,
createDirs: createDirs
};