Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.7k
Using the `tns create` command
TJ VanToll edited this pageJan 13, 2017 ·3 revisions
Here’s a list of the various ways you can use the NativeScript command-line interface’stns create
to start NativeScript apps.
tns create MyApp
: Creates an app named “MyApp” using a basichello world JavaScript template.tns create MyApp --tsc
: Creates an app using a basichello world TypeScript template.tns create MyApp --ng
: Creates an app using a simpleTypeScript and Angular template.
To expand on this list, you can also use thecreate
command’s--template
option to build apps. The--template
option accepts names of npm packages, paths to GitHub repos, and paths within your local file system. Here are a few examples.
tns create MyApp --template tns-template-hello-world
: Creates an app using the“tns-template-hello-world” package on npm.tns create MyApp --template https://github.com/NativeScript/template-hello-world
: Creates an app using the template code that lives in the repo athttps://github.com/NativeScript/template-hello-world.tns create --template ~/path/to/my-template
: Creates an app using the code that lives at~/path/to/my-template
on your development machine.
TIP: You cancreate your own NativeScript templates for use with the
--template
option.