Skip to content

Commit e9ab6e0

Browse files
committed
Reworking the installation instructions a bit—hopefully for clarity
1 parent db21f63 commit e9ab6e0

File tree

2 files changed

+25
-43
lines changed

2 files changed

+25
-43
lines changed

index.html

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,13 @@ <h4 class="exercise-start">
8686
<b>Exercise</b>: Setup NativeScript
8787
</h4>
8888

89-
<ul>
90-
<li><strong>Step 1</strong>: Install Node.js.</li>
91-
</ul>
89+
<p><strong>Step 1: Install Node.js</strong></p>
9290
<p>The NativeScript CLI is built on Node.js, and as such you need to have Node.js installed to use NativeScript.</p>
9391
<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 <a href="https://nodejs.org/">https://nodejs.org/</a> and download and install the latest “LTS” distribution for your development machine.</p>
9492
<blockquote>
9593
<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>
9694
</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>
10096
<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>
10197
<pre><code>npm install -g nativescript
10298
</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&#39;ll stick with the shorter <code>tns</code>.</p>
@@ -110,33 +106,25 @@ <h4 class="exercise-start">
110106
│ General │ $ tns &lt;Command&gt; [Command Parameters] [--command &lt;Options&gt;] │
111107
│ Alias │ $ nativescript &lt;Command&gt; [Command Parameters] [--command &lt;Options&gt;] │
112108
└─────────┴─────────────────────────────────────────────────────────────────────┘
113-
</code></pre><ul>
114-
<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>
118113
<ul>
119-
<li><strong>Step 3—Option A</strong>: Run quick setup scripts</li>
114+
<li><a href="http://docs.nativescript.org/start/ns-setup-win#setup">Advanced setup: Windows</a></li>
115+
<li><a href="http://docs.nativescript.org/start/ns-setup-os-x#setup">Advanced setup: OS X</a></li>
116+
<li><a href="http://docs.nativescript.org/start/ns-setup-linux#setup">Advanced setup: Linux</a></li>
120117
</ul>
121-
<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>
122120
<p>If you’re on Windows, copy and paste the script below into your command prompt and press Enter:</p>
123121
<pre><code>@powershell -NoProfile -ExecutionPolicy Bypass -Command &quot;iex ((new-object net.webclient).DownloadString(&#39;https://raw.githubusercontent.com/NativeScript/nativescript-cli/production/setup/native-script.ps1&#39;))&quot;
124122
</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>
125124
<p>If you’re on a Mac, copy and paste the script below into your terminal and press Enter:</p>
126125
<pre><code>ruby -e &quot;$(curl -fsSL https://raw.githubusercontent.com/NativeScript/nativescript-cli/production/setup/native-script.rb)&quot;
127126
</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>
132-
<ul>
133-
<li><a href="http://docs.nativescript.org/start/ns-setup-win#setup">Advanced setup: Windows</a></li>
134-
<li><a href="http://docs.nativescript.org/start/ns-setup-os-x#setup">Advanced setup: OS X</a></li>
135-
<li><a href="http://docs.nativescript.org/start/ns-setup-linux#setup">Advanced setup: Linux</a></li>
136-
</ul>
137-
<ul>
138-
<li><strong>Step 4</strong>: Verify the setup</li>
139-
</ul>
127+
<p><strong>Step 4: Verify the setup</strong></p>
140128
<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>
141129
<pre><code>tns doctor
142130
</code></pre><p>If you see “No issues were detected” you’re good to go!</p>

src/chapters/chapter1.md

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ The NativeScript CLI has a few system requirements you must have in place before
1010
<b>Exercise</b>: Setup NativeScript
1111
</h4>
1212

13-
* **Step 1**: Install Node.js.
13+
**Step 1: Install Node.js**
1414

1515
The NativeScript CLI is built on Node.js, and as such you need to have Node.js installed to use NativeScript.
1616

1717
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.
1818

1919
> **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.
2020
21-
* **Step 2**: Install the NativeScript CLI
21+
**Step 2: Install the NativeScript CLI**
2222

2323
Open your terminal or command prompt and execute the following command to install the NativeScript CLI from npm, which is Node.js’ package manager:
2424

@@ -42,15 +42,16 @@ $ tns
4242
└─────────┴─────────────────────────────────────────────────────────────────────┘
4343
```
4444

45-
* **Step 3**: Install iOS and Android requirements
45+
**Step 3: Install iOS and Android requirements**
4646

47-
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.
4848

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.
50+
> * [Advanced setup: Windows](http://docs.nativescript.org/start/ns-setup-win#setup)
51+
> * [Advanced setup: OS X](http://docs.nativescript.org/start/ns-setup-os-x#setup)
52+
> * [Advanced setup: Linux](http://docs.nativescript.org/start/ns-setup-linux#setup)
5053
51-
* **Step 3—Option A**: Run quick setup scripts
52-
53-
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>
5455

5556
If you’re on Windows, copy and paste the script below into your command prompt and press Enter:
5657

@@ -60,6 +61,8 @@ If you’re on Windows, copy and paste the script below into your command prompt
6061

6162
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.
6263

64+
<u>OS X</u>
65+
6366
If you’re on a Mac, copy and paste the script below into your terminal and press Enter:
6467

6568
```
@@ -68,16 +71,7 @@ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/NativeScript/nativescrip
6871

6972
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.
7073

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.
74-
75-
* [Advanced setup: Windows](http://docs.nativescript.org/start/ns-setup-win#setup)
76-
* [Advanced setup: OS X](http://docs.nativescript.org/start/ns-setup-os-x#setup)
77-
* [Advanced setup: Linux](http://docs.nativescript.org/start/ns-setup-linux#setup)
78-
79-
80-
* **Step 4**: Verify the setup
74+
**Step 4: Verify the setup**
8175

8276
Once you’ve finished installing NativeScript and its dependencies, run the `tns doctor` command, which will check for any issues with your installation.
8377

0 commit comments

Comments
 (0)