You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>The NativeScript CLI is built on Node.js, and as such you need to have Node.js installed to use NativeScript.</p>
93
91
<p>You can check whether you have Node.js setup by opening a terminal or command prompt on your development machine and executing <code>node --version</code>. If you get an error, head to the <ahref="https://nodejs.org/">https://nodejs.org/</a> and download and install the latest “LTS” distribution for your development machine.</p>
94
92
<blockquote>
95
93
<p><strong>TIP</strong>: The NativeScript CLI supports a wide variety of Node.js versions, so if you already have Node.js installed you should be good to go. If, by chance, you’re running an unsupported version, the <code>tns doctor</code> command we’ll run momentarily will flag the problem so you can upgrade.</p>
96
94
</blockquote>
97
-
<ul>
98
-
<li><strong>Step 2</strong>: Install the NativeScript CLI</li>
99
-
</ul>
95
+
<p><strong>Step 2: Install the NativeScript CLI</strong></p>
100
96
<p>Open your terminal or command prompt and execute the following command to install the NativeScript CLI from npm, which is Node.js’ package manager:</p>
101
97
<pre><code>npm install -g nativescript
102
98
</code></pre><p>After completing the setup you should have two commands available from your terminal or command prompt: <code>tns</code>—which is short for <b>T</b>elerik <b>N</b>ative<b>S</b>cript—and <code>nativescript</code>. The two commands are equivalent, so we'll stick with the shorter <code>tns</code>.</p>
<li><strong>Step 3</strong>: Install iOS and Android requirements</li>
115
-
</ul>
116
-
<p>When you build with NativeScript you’re building truly native iOS and Android apps, and as such, you need to have the system requirements for each platform you intend to build for on your development machine.</p>
117
-
<p>NativeScript provides two options for installing these requirements—quick setup scripts for developers new to mobile development, and advanced setup scripts for experienced mobile developers, as well as developers that want complete control over the installation process.</p>
109
+
</code></pre><p><strong>Step 3: Install iOS and Android requirements</strong></p>
110
+
<p>When you build with NativeScript you’re building truly native iOS and Android apps, and as such, you need to setup each platform you intend to build for on your development machine. To ease the pain of installing all of these requirements manually, the NativeScript CLI provides quick-start scripts for Windows and OS X that handle the necessary setup for you automatically. Let’s look at how they work.</p>
111
+
<blockquote>
112
+
<p><strong>NOTE</strong>: If you have existing mobile experience, if you’re on Linux, or if you want to control the installation process yourself, refer to one of the advanced setup guide below, which walk you through manually setting up your environment for NativeScript development.</p>
118
113
<ul>
119
-
<li><strong>Step 3—Option A</strong>: Run quick setup scripts</li>
<p>If you’re new to mobile development, and you’re on Windows or OS X, the NativeScript quick setup scripts are a great way to get up and running for NativeScript development.</p>
118
+
</blockquote>
119
+
<p><u>Windows</u></p>
122
120
<p>If you’re on Windows, copy and paste the script below into your command prompt and press Enter:</p>
</code></pre><p>During installation you may need to accept a User Account Control prompt to grant the script administrative privileges. Also, be aware that the script downloads and installs some big dependencies—so it’s common for the script to take a while to complete.</p>
123
+
<p><u>OS X</u></p>
125
124
<p>If you’re on a Mac, copy and paste the script below into your terminal and press Enter:</p>
</code></pre><p>Much like the Windows script, the OS X script needs administrative access to run some commands using <code>sudo</code>; therefore, you may need to provide your password several times during execution. The OS X script also may take some time to complete, as it’s installing the dependencies for both iOS and Android development.</p>
128
-
<ul>
129
-
<li><strong>Step 3—Option B</strong>: Complete the advanced setup</li>
130
-
</ul>
131
-
<p>If you have existing mobile experience, or if you want to control the installation process yourself, refer to one of the advanced setup guide below, which walk you through manually setting up your environment for NativeScript development.</p>
<li><strong>Step 4</strong>: Verify the setup</li>
139
-
</ul>
127
+
<p><strong>Step 4: Verify the setup</strong></p>
140
128
<p>Once you’ve finished installing NativeScript and its dependencies, run the <code>tns doctor</code> command, which will check for any issues with your installation.</p>
141
129
<pre><code>tns doctor
142
130
</code></pre><p>If you see “No issues were detected” you’re good to go!</p>
Copy file name to clipboardExpand all lines: src/chapters/chapter1.md
+12-18Lines changed: 12 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,15 +10,15 @@ The NativeScript CLI has a few system requirements you must have in place before
10
10
<b>Exercise</b>: Setup NativeScript
11
11
</h4>
12
12
13
-
***Step 1**: Install Node.js.
13
+
**Step 1: Install Node.js**
14
14
15
15
The NativeScript CLI is built on Node.js, and as such you need to have Node.js installed to use NativeScript.
16
16
17
17
You can check whether you have Node.js setup by opening a terminal or command prompt on your development machine and executing `node --version`. If you get an error, head to the https://nodejs.org/ and download and install the latest “LTS” distribution for your development machine.
18
18
19
19
> **TIP**: The NativeScript CLI supports a wide variety of Node.js versions, so if you already have Node.js installed you should be good to go. If, by chance, you’re running an unsupported version, the `tns doctor` command we’ll run momentarily will flag the problem so you can upgrade.
20
20
21
-
***Step 2**: Install the NativeScript CLI
21
+
**Step 2: Install the NativeScript CLI**
22
22
23
23
Open your terminal or command prompt and execute the following command to install the NativeScript CLI from npm, which is Node.js’ package manager:
When you build with NativeScript you’re building truly native iOS and Android apps, and as such, you need to have the system requirements for each platform you intend to build for on your development machine.
47
+
When you build with NativeScript you’re building truly native iOS and Android apps, and as such, you need to setup each platform you intend to build for on your development machine. To ease the pain of installing all of these requirements manually, the NativeScript CLI provides quick-start scripts for Windows and OS X that handle the necessary setup for you automatically. Let’s look at how they work.
48
48
49
-
NativeScript provides two options for installing these requirements—quick setup scripts for developers new to mobile development, and advanced setup scripts for experienced mobile developers, as well as developers that want complete control over the installation process.
49
+
> **NOTE**: If you have existing mobile experience, if you’re on Linux, or if you want to control the installation process yourself, refer to one of the advanced setup guide below, which walk you through manually setting up your environment for NativeScript development.
If you’re new to mobile development, and you’re on Windows or OS X, the NativeScript quick setup scripts are a great way to get up and running for NativeScript development.
54
+
<u>Windows</u>
54
55
55
56
If you’re on Windows, copy and paste the script below into your command prompt and press Enter:
56
57
@@ -60,6 +61,8 @@ If you’re on Windows, copy and paste the script below into your command prompt
60
61
61
62
During installation you may need to accept a User Account Control prompt to grant the script administrative privileges. Also, be aware that the script downloads and installs some big dependencies—so it’s common for the script to take a while to complete.
62
63
64
+
<u>OS X</u>
65
+
63
66
If you’re on a Mac, copy and paste the script below into your terminal and press Enter:
Much like the Windows script, the OS X script needs administrative access to run some commands using `sudo`; therefore, you may need to provide your password several times during execution. The OS X script also may take some time to complete, as it’s installing the dependencies for both iOS and Android development.
70
73
71
-
***Step 3—Option B**: Complete the advanced setup
72
-
73
-
If you have existing mobile experience, or if you want to control the installation process yourself, refer to one of the advanced setup guide below, which walk you through manually setting up your environment for NativeScript development.
Once you’ve finished installing NativeScript and its dependencies, run the `tns doctor` command, which will check for any issues with your installation.
0 commit comments