Ionic-framework: Proposal: ionic start in current working directory

Created on 21 May 2015  路  4Comments  路  Source: ionic-team/ionic-framework

Right now, ionic start . is interpreted as "create a project named .".

$ mkdir project; cd project
$ ionic start .
Please name your Ionic project something meaningful other than '.'

Instead, ionic start . could take the project name from the current working directory

$ mkdir project; cd project
$ ionic start .
Creating Ionic app in folder /home/me/project

I don't think this behaviour is surprising, but the user could be asked to approve if ionic is running in an interactive shell (ionic start is not a command that you repeatedly run):

$ ionic start .
Create project in current directory? [Y/n]

Most helpful comment

What kind of worms, exactly?

All 4 comments

Turning an existing directory in to an ionic project opens a bigger can of worms than the benefits weigh. Sorry, not this time around.

What kind of worms, exactly?

I think the README should probably be changed then, to say, start with ionic start proj tabs then cd into that directory, and then do git add remote ..., git push.

I think the problem is people make the repo, check it out (or just git init) and then try to run the ionic start command, and it fails, or it makes another folder in their project, and they are confused.

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

infinnie picture infinnie  路  76Comments

wonderdogone picture wonderdogone  路  121Comments

xims picture xims  路  66Comments

TheMohanraj picture TheMohanraj  路  159Comments

vonovak picture vonovak  路  66Comments