Skip to content

Commit

Permalink
support path argument for init
Browse files Browse the repository at this point in the history
  • Loading branch information
guybedford committed Jan 1, 2015
1 parent 2d5c923 commit a8123fd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ process.on('uncaughtException', function(err) {
ui.log('\n'
+ 'jspm run main Run a jspm module in Node\n'
+ '\n'
+ 'jspm init [--prompts] Create / validate project configuration file\n'
+ 'jspm init [basepath] [--prompts] Create / validate project configuration file\n'
+ '\n'
+ 'jspm install <name[=target]+> [--force skips cache] [--latest]\n'
+ ' install jquery Install a package from the registry to latest\n'
Expand Down Expand Up @@ -242,7 +242,7 @@ process.on('uncaughtException', function(err) {
if (options.yes)
ui.useDefaults();

core.init(options.prompts);
core.init(options.args[1], options.prompts);
break;


Expand Down
4 changes: 3 additions & 1 deletion lib/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ exports.dlLoader = function(unminified, edge) {
});
}

exports.init = function init(ask) {
exports.init = function init(basePath, ask) {
if (basePath)
process.env.jspmConfigPath = path.resolve(basePath, 'package.json');
return config.load(ask)
.then(function() {
return config.save();
Expand Down

0 comments on commit a8123fd

Please sign in to comment.