Nativescript-cli: Provide a shorthand for starting Angular 2 apps

Created on 10 Mar 2016  路  8Comments  路  Source: NativeScript/nativescript-cli

Related to https://github.com/NativeScript/nativescript-cli/issues/1498.

As we talk about Angular 2 more I think it鈥檚 important that we optimize the getting started experience as much as possible. With that in mind I鈥檇 like to propose that we create a --ng flag for tns create that acts as a shorthand for tns create my-app-name --template https://github.com/NativeScript/template-hello-world-ng.

So tns create my-next-great-angular-project --ng. Thoughts?

Most helpful comment

With the shorthand implementation of:

tns create my-next-great-angular-project --template angular

and

tns create my-next-great-angular-project --ng

I think it makes sense to support also

tns create my-next-great-typescript-project --tsc

for

tns create my-next-great-typescript-project --template typescript

This will keep the command options consistent as well.

What do you think?

All 8 comments

@tjvantoll Is it expected to have tns-core-modules from angular tag?
Also we may add a shortcut for the template, as we've created for typescript:

tns create my-next-great-angular-project --template ng
tns create my-next-great-angular-project --template angular

Both will use the angular template.

In case we provide --ng option, I believe the new app should install modules from angular tag, but maybe I'm not correct.

@hdeshev Do we plan to maintain the @angular tag in the long term?

We need @angular for out of band releases, so that we can release the angular renderer with unofficial tns-core-modules features/fixes. I expect that need to diminish greatly over the next couple of months, and I hope it is temporary.

I don't expect it to disappear completely, but we'll probably use it very rarely. I think it's perfectly fine to pick a version of nativescript-angular that works with the official tns-core-modules release and use that when starting a project with the --ng option. (Actually picking the right version is a thing we need to agree upon too :wink:)

@rosen-vladimirov I would expect tns create my-next-great-project --ng to simply clone https://github.com/NativeScript/template-hello-world-ng. If that template needs a special version of tns-core-modules its package.json can just take care of that for me.

I like the idea of having tns create my-next-great-angular-project --template ng, but personally I鈥檓 in favor of (additionally?) having tns create my-next-great-angular-project --ng as a even shorter shorthand :smile:

@tjvantoll I agree we can have both options ;)

love this. :+1:

With the shorthand implementation of:

tns create my-next-great-angular-project --template angular

and

tns create my-next-great-angular-project --ng

I think it makes sense to support also

tns create my-next-great-typescript-project --tsc

for

tns create my-next-great-typescript-project --template typescript

This will keep the command options consistent as well.

What do you think?

Moved my suggestion to a separate issue: https://github.com/NativeScript/nativescript-cli/issues/1650.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

leevigraham picture leevigraham  路  3Comments

kefahB picture kefahB  路  3Comments

NickIliev picture NickIliev  路  3Comments

trodellez picture trodellez  路  3Comments

farfromrefug picture farfromrefug  路  3Comments