- Hello World
NativeScript CLI build on Nodejs so you must have to install Nodejs before using it. If you are using Mac and you have alredy installed brew (https://brew.sh) then open terminal and type following command to install Nodejs
brew install nodejs
For other platform installation please check https://nodejs.org/
I am assuming that you are using Mac
npm install -g nativescript
You may need to use sudo to install native script globally on Mac. For on the other platform installation of NativeScript please check there documentation (http://docs.nativescript.org/start/quick-setup)
To create a Hello World project open the terminal and type following command
tns create HelloWorld
If you want to use TypeScript or Angular template please use following tags to create your project.
tns create HelloWorld --tsc // for TypeScript
Go to HelloWorld project and using terminal and type following and hit enter to run the project on iOS emulator.
tns run android --emulator // it will run into Android emulator
It should launch an Android or iPhone emulator base on above command and run the project.