ionic is getting much better day by day but there is one thing i don't like about ionic is way it creates new project.
$ ionic start test.app tabs
the above command creates ionic project with tabs with following config.xml
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.ionicframework.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>HelloCordova</name>
<description>
An Ionic Framework and Cordova project.
</description>
<author email="hi@ionicframework" href="http://ionicframework.com/">
Ionic Framework Team
</author>
<content src="index.html" />
<access origin="*" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="false" />
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<!-- Don't store local date in an iCloud backup. Turn this to "cloud" to enable storage
to be sent to iCloud. Note: enabling this could result in Apple rejecting your app.
-->
<preference name="BackupWebStorage" value="none" />
<feature name="StatusBar">
<param name="ios-package" value="CDVStatusBar" onload="true" />
</feature>
</widget>
According to my knowledge which creates
App name : HelloCordova
package : com.ionicframework.starter
i think ionic start should be more like this ,which feels more like cordova
$ ionic start AppName com.package.name AppFolderName ionic-tamplate[tab|blank|sidemenu]
What do you think ??
ionic start has one interesting concept of creating projects based on templates like tabs,sidemenu
I have a suggestion why not create a github repo for creating and submitting community generated ionic templates which can be used by everyone just like tabs, sidemenus
Thanks
i agree
Ya ionic should allow us to give specific name at start..
Agreed, especially with the community templates
Yeah I like the idea of updating the config file from the start. What about something like this:
$ ionic start mydirectory tabs --app_name MyAppName --package_name com.package.mine
or the shorter version:
$ ionic start mydirectory tabs -a MyAppName -p com.package.mine
I think the first four arguments should stay the same, and the first three are required:
And then we can use other optional arguments, and even the template argument could be apart of the options instead of an unnamed 4th argument.
--app_name, -a
--package_name, -p
--template, -t
If any options are not added we'll continue to use the defaults. Thoughts?
I like it, I'd say dashes not underscores though. Maybe even drop the second word from each?
Our command like arg processor should handle that fine
Sent from my iPhone
On Jul 2, 2014, at 9:59 PM, Adam Bradley [email protected] wrote:
Yeah I like the idea of updating the config file from the start. What about something like this:
$ ionic start mydirectory tabs --app_name MyAppName --package_name com.package.mine
or the shorter version:$ ionic start mydirectory tabs -a MyAppName -p com.package.mine
I think the first four arguments should stay the same, and the first three are required:ionic
start
directory to create
template to choose from (optional, defaults to blank)
And then we can use other optional arguments, and even the template argument could be apart of the options instead of an unnamed 4th argument.--app_name, -a
--package_name, -p
--template, -t
If any options are not added we'll continue to use the defaults. Thoughts?—
Reply to this email directly or view it on GitHub.
--app, -a
--package, -p
--template, -t
:+1:
+1 from me, that would be nice.
Added these cmd line flags/options as of v1.0.17:
https://github.com/driftyco/ionic-cli/blob/master/README.md#starting-an-ionic-app
ionic start -a "Super Loo App" demoapp sidemenu -i super.demo.app
This will create :
1 - folder name "demoapp"
2 - downloading template project sidemenu
3 - set app name to "Super Loo App"
4 - set package name to "super.demo.app"
@azizimusa Thank you for the details :D
sounds good. +1 from me too.
The doc's right here
http://ionicframework.com/docs/cli/start.html
Once you create the project just go and build your project again like ...
ionic build ios
After that its provide you with whats you created (project name) already....
But how can I safely change the package name on the project I already created? I have tried to change the widget it in config.xml, but the build was failed. Any ideas?
I am using these new flags, as I too have the 'HelloCordova' issue; changing config.xml isn't enough to change that name throughout the project. I used:
$ ionic start trackerIos -a "DisplayTracks" -i com.displaytracks.iosTracker --io-app-id com.displaytracks.iosTracker
...and I am still getting the 'HelloCordova.xcode.proj' and 'HelloCordva' directory in /trackerIos/platforms/ios . It changes the root config.xml, but not the one in the ios dir. I have to remove the ios platform and re-add it and then it picks up correctly. (I might be an anomaly, just getting started)
Same here. Still getting HelloCordova!
Issue solved, read up on ionic's other git thread, dude added some connivance params
$ ionic start projectName -a "Project Name" -i com.displaytracks.iosTracker --io-app-id com.projectName
//Now change your root config.xml, remove ios and re-add it
$ ionic removePlatform ios //if it exists
$ ionic addPlatform ios
$ ionic removePlatform ios //if it exists
$ ionic addPlatform ios
Worked for me...!!!
$ ionic start projectName -a "Project Name" -i com.displaytracks.iosTracker --io-app-id com.projectName
//Now change your root config.xml, remove ios and re-add it
$ ionic removePlatform ios //if it exists
$ ionic addPlatform ios
Not working for me, still have "android-debug.apk" as package name after $ionic build android.
In config.xml i have the expected value in Widget id's but "ionic build android" don't take this value for package naming.
Anyone has an idea ?
Most helpful comment
ionic start -a "Super Loo App" demoapp sidemenu -i super.demo.app
This will create :
1 - folder name "demoapp"
2 - downloading template project sidemenu
3 - set app name to "Super Loo App"
4 - set package name to "super.demo.app"