-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Using the `tns create` command
TJ VanToll edited this page Jan 13, 2017
·
3 revisions
Here’s a list of the various ways you can use the NativeScript command-line interface’s tns create
to start NativeScript apps.
-
tns create MyApp
: Creates an app named “MyApp” using a basic hello world JavaScript template. -
tns create MyApp --tsc
: Creates an app using a basic hello world TypeScript template. -
tns create MyApp --ng
: Creates an app using a simple TypeScript and Angular template.
To expand on this list, you can also use the create
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 at https://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 can create your own NativeScript templates for use with the
--template
option.