> On Oct. 16, 2013, 8:45 p.m., Michal Mocny wrote: > > src/create.js, line 76 > > <https://reviews.apache.org/r/14681/diff/1/?file=365324#file365324line76> > > > > Why bother supporting empty directories? If its a huge directory it > > may take a while to fail?
It's mostly for the sake of supporting . as the dir. > mkdir tstapp > cd tstapp > cordova create . I think some people would get annoyed if this failed complaining that . already exists. > On Oct. 16, 2013, 8:45 p.m., Michal Mocny wrote: > > src/create.js, line 55 > > <https://reviews.apache.org/r/14681/diff/1/?file=365324#file365324line55> > > > > what if cfg already has a 'name'? > > > > what would it mean to call create with a name argument and a name key > > on cfg? perhaps we just make that invalid? One option is to use the argument if it's given and disregard whatever might be in cfg, but use cfg.name if the argument is a falsy value. What do you think about the following? cfg = cfg || {}; id = id || cfg.id || DEFAULT_ID; name = name || cfg.name || DEFAULT_NAME; cfg.id = id; cfg.name = name; - Mark ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/14681/#review27082 ----------------------------------------------------------- On Oct. 16, 2013, 8:17 p.m., Mark Koudritsky wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/14681/ > ----------------------------------------------------------- > > (Updated Oct. 16, 2013, 8:17 p.m.) > > > Review request for cordova. > > > Bugs: CB-4748 > https://issues.apache.org/jira/browse/CB-4748 > > > Repository: cordova-cli > > > Description > ------- > > CB-4748: Fail quickly if dir passed to cordova create is not empty. > This change also exists as: https://github.com/apache/cordova-cli/pull/55 > > > Also add cfg parameter to create() for extra configuration which saved in > .cordova/config.json > Should come together with the corresponding change in mca.js: > https://github.com/MobileChromeApps/mobile-chrome-apps/pull/25 > > > Diffs > ----- > > src/create.js 4b2b950 > > Diff: https://reviews.apache.org/r/14681/diff/ > > > Testing > ------- > > ./mca.js create io.some.app2 > > > Thanks, > > Mark Koudritsky > >
