Skip to content

Commit fb763de

Browse files
Merge branch 'release' into vladimirov/merge-release-0-9-1
Conflicts: lib/common
2 parents 11b5303 + 94f3dcf commit fb763de

File tree

5 files changed

+91
-43
lines changed

5 files changed

+91
-43
lines changed

README.md

Lines changed: 58 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
Telerik NativeScript Command-Line Interface
1+
NativeScript Command-Line Interface
22
================
33
[![Build Status](https://travis-ci.org/NativeScript/nativescript-cli.svg?branch=build)][2]
44

55
*Create, build, and run native apps for iOS and Android using JavaScript or TypeScript*
66

7-
The Telerik NativeScript CLI lets you create, build, and deploy Telerik NativeScript-based projects on iOS and Android devices.
7+
The NativeScript CLI lets you create, build, and deploy NativeScript-based projects on iOS and Android devices.
88

99
* [What is NativeScript](#what-is-nativescript "Quick overview of NativeScript, the JavaScript framework for cross-platform development of native iOS and Android apps")
1010
* [Supported Platforms](#supported-platforms "The mobile platforms you can target with NativeScript")
@@ -27,8 +27,6 @@ The Telerik NativeScript CLI lets you create, build, and deploy Telerik NativeSc
2727
What is NativeScript
2828
===
2929

30-
> NativeScript is currently available as a private preview. To sign up for the NativeScript Insiders program, visit <a href="http://www.telerik.com/nativescript-insiders-signup" target="_blank">http://www.telerik.com/nativescript-insiders-signup</a>.
31-
3230
NativeScript is a cross-platform JavaScript framework that lets you develop native iOS and Android apps from a single code base. The framework provides JavaScript access to the native APIs, user interface, and rendering engines of iOS and Android. By using JavaScript or TypeScript, you can create one project that builds into an iOS or Android app with completely native user experience.
3331

3432
To learn more about NativeScript, you can check the following resources:
@@ -61,18 +59,19 @@ You can install and run the NativeScript CLI on Windows or OS X.
6159

6260
* [Windows](#widnows)
6361
* [OS X](#os-x)
62+
* [Linux](#linux)
6463

6564
## Windows
6665

6766
> On Windows systems, you can develop, build, and deploy NativeScript projects that target Android.
6867
6968
* Windows Vista or later
70-
* [Node.js 0.10.26] or a later stable official release
71-
* (Optional) [Chocolatey]
72-
* [JDK 6] or a later stable official release
73-
* [Apache Ant 1.8] or a later stable official release
74-
* [Android SDK 19] or a later stable official release
75-
* (Optional) [Genymotion]
69+
* [Node.js 0.10.26][Node.js 0.10.26] or a later stable official release
70+
* (Optional) [Chocolatey][Chocolatey]
71+
* [JDK 7][JDK 7] or a later stable official release
72+
* [Apache Ant 1.8][Apache Ant 1.8] or a later stable official release
73+
* [Android SDK 19][Android SDK 19] or a later stable official release
74+
* (Optional) [Genymotion][Genymotion]
7675

7776
If you want to develop for Android, verify that you have added the following paths in the `PATH` system environment variable.
7877

@@ -136,17 +135,16 @@ If you have installed Chocolatey, you can complete these steps to set up JDK, Ap
136135
> On OS X systems, you can develop, build, and deploy NativeScript projects that target iOS and Android.
137136
138137
* OS X Mavericks
139-
* [Node.js 0.10.26] or a later stable official release
138+
* [Node.js 0.10.26][Node.js 0.10.26] or a later stable official release
140139
* For iOS development
141-
* [iOS 7.0 SDK][12] or a later stable official release
142-
* [Xcode 5][12] or a later stable official release
140+
* [Latest Xcode][12]
143141
* [Xcode command-line tools][12]
144-
* (Optional) [Mono] installed via Homebrew
142+
* (Optional for working with third-party libraries) [64-bit Mono][Mono] installed via Homebrew
145143
* For Android development
146-
* [JDK 6] or a later stable official release
147-
* [Apache Ant 1.8] or a later stable official release
148-
* [Android SDK 19] or a later stable official release
149-
* (Optional) [Genymotion]
144+
* [JDK 7][JDK 7] or a later stable official release
145+
* [Apache Ant 1.8][Apache Ant 1.8] or a later stable official release
146+
* [Android SDK 19][Android SDK 19] or a later stable official release
147+
* (Optional) [Genymotion][Genymotion]
150148

151149
If you want to develop for Android, verify that you have added the following paths in your `PATH` in `~/.bash_profile`.
152150

@@ -161,6 +159,45 @@ For example:
161159
export PATH=${PATH}:/ant/apache-ant-1.9.4/bin:/Applications/Android Studio.app/sdk/tools:/Applications/Android Studio.app/sdk/platform-tools
162160
```
163161

162+
## Linux
163+
164+
> On Linux systems, you can develop, build, and deploy NativeScript projects that target Android.
165+
166+
* Ubuntu 14.04 LTS
167+
* [Node.js 0.10.26][Node.js 0.10.26] or a later stable official release<br/>If installed via `sudo apt-get install`, use the `nodejs-legacy` package.
168+
169+
```Shell
170+
sudo apt-get install nodejs-legacy
171+
```
172+
* G++ compiler
173+
174+
```Shell
175+
sudo apt-get install g++
176+
```
177+
* On 64-bit systems only
178+
* The runtime libraries for the ia32/i386 architecture.
179+
180+
```Shell
181+
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 libstdc++6:i386
182+
```
183+
* [JDK 7][JDK 7] or a later stable official release
184+
* [Apache Ant 1.8][Apache Ant 1.8] or a later stable official release
185+
* [Android SDK 19][Android SDK 19] or a later stable official release
186+
* (Optional) [Genymotion][Genymotion]
187+
188+
Verify that you have added the following paths in your `PATH`.
189+
190+
```
191+
Path to the bin subdirectory in the Apache Ant installation directory
192+
Path to the tools subdirectory in the Android SDK installation directory
193+
Path to the platform-tools subdirectory in the Android SDK installation directory
194+
```
195+
196+
For example:
197+
```
198+
export PATH=${PATH}:/ant/apache-ant-1.9.4/bin:/Applications/Android Studio.app/sdk/tools:/Applications/Android Studio.app/sdk/platform-tools
199+
```
200+
164201
[Back to Top][1]
165202

166203
Installation
@@ -174,6 +211,8 @@ In the command prompt, run the following command.
174211
npm install nativescript -g
175212
```
176213

214+
> On OS X and Linux systems, you might need to run this command using sudo.
215+
177216
[Back to Top][1]
178217

179218
Quick Start
@@ -468,7 +507,7 @@ This software is licensed under the Apache 2.0 license, quoted <a href="LICENSE"
468507
[12]: https://developer.apple.com/xcode/downloads/
469508
[Node.js 0.10.26]: http://nodejs.org/download/
470509
[Chocolatey]: https://chocolatey.org/
471-
[JDK 6]: http://www.oracle.com/technetwork/java/javase/downloads/index.html
510+
[JDK 7]: http://www.oracle.com/technetwork/java/javase/downloads/index.html
472511
[Apache Ant 1.8]: http://ant.apache.org/bindownload.cgi
473512
[Android SDK 19]: http://developer.android.com/sdk/index.html
474513
[Genymotion]: https://www.genymotion.com/#!/

lib/node-package-manager.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ export class NodePackageManager implements INodePackageManager {
131131

132132
private addToCacheCore(packageName: string, version: string): IFuture<void> {
133133
var future = new Future<void>();
134-
npm.commands["cache"].add(packageName, version, undefined, (err: Error, data: any) => {
134+
// cache.add = function (pkg, ver, where, scrub, cb)
135+
npm.commands["cache"].add(packageName, version, undefined, false, (err: Error, data: any) => {
135136
if(err) {
136137
future.throw(err);
137138
} else {
@@ -144,7 +145,8 @@ export class NodePackageManager implements INodePackageManager {
144145
public cacheUnpack(packageName: string, version: string, unpackTarget?: string): IFuture<void> {
145146
var future = new Future<void>();
146147
unpackTarget = unpackTarget || path.join(npm.cache, packageName, version, "package");
147-
npm.commands["cache"].unpack(packageName, version, unpackTarget, (err: Error, data: any) => {
148+
// function unpack (pkg, ver, unpackTarget, dMode, fMode, uid, gid, cb)
149+
npm.commands["cache"].unpack(packageName, version, unpackTarget, null, null, null, null, (err: Error, data: any) => {
148150
if(err) {
149151
future.throw(err);
150152
} else {

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nativescript",
33
"preferGlobal": true,
4-
"version": "0.9.0",
4+
"version": "0.9.1",
55
"author": "Telerik <support@telerik.com>",
66
"description": "Command-line interface for building NativeScript projects",
77
"bin": {
@@ -33,14 +33,14 @@
3333
"filesize": "2.0.3",
3434
"gaze": "0.5.1",
3535
"iconv-lite": "0.4.4",
36-
"ios-sim-portable": "1.0.2",
36+
"ios-sim-portable": "1.0.4",
3737
"lockfile": "1.0.0",
3838
"lodash": "3.2.0",
3939
"log4js": "0.6.9",
4040
"mkdirp": "0.3.5",
4141
"mute-stream": "0.0.4",
4242
"node-uuid": "1.4.1",
43-
"npm": "1.4.26",
43+
"npm": "2.6.1",
4444
"osenv": "0.1.0",
4545
"open": "0.0.4",
4646
"plist": "1.1.0",

resources/help.txt

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ General commands:
2424
emulate Deploys the project in the native emulator for the selected target platform.
2525
run Runs your project on a connected device or in the native emulator, if configured.
2626
This is shorthand for prepare, build, and deploy.
27-
debug Debugs your project on a connected device or in the native emulator, if configured.
27+
debug Debugs your project on a connected device.
2828
device Lists all recognized connected physical or virtual device.
2929
device log Opens the log stream for the selected device.
3030
device run Runs the selected application on a connected device.
@@ -415,38 +415,45 @@ Options:
415415
--[debug]--
416416

417417
Usage:
418-
$ tns debug <Platform> [--device <Device ID>] [--debug-brk | --start | --stop | --get-port] [--debug-port <port>]
419-
$ nativescript debug <Platform> [--device <Device ID>] [--debug-brk | --start | --stop | --get-port] [--debug-port <port>]
420-
418+
$ tns debug android [--device <Device ID> | --emulator <Emulator Options> | --geny <Geny Name> ] [--debug-brk | --start | --stop | --get-port] [--debug-port <port>]
419+
$ tns debug ios [--device <Device ID>] [--debug-brk | --start ]
420+
421421
Platform-specific usage:
422422
$ tns debug android --get-port
423-
$ tns debug android --debug-brk
423+
$ tns debug android --debug-brk [--debug-port <port>]
424+
$ tns debug android --start [--debug-port <port>]
425+
$ tns debug android --stop
424426
$ tns debug ios --debug-brk
425-
$ nativescript debug android --debug-brk
426-
$ nativescript debug ios --start
427+
$ tns debug ios --start
427428

428-
Debugs your project on a connected device or in the native emulator, if configured. This is shorthand for prepare, build, and deploy.
429-
<Device ID> is the index or name of the target device as listed by $ tns list-devices.
429+
Debugs your project on a connected device or in a native emulator.
430430

431-
Before building for the Android emulator, verify that you have met the following requirements.
432-
You have added the file paths to the following directories from the Android SDK to your PATH environment variable.
433-
tools
434-
platform-tools
435-
You have created at least one device with the Android Virtual Device manager.
431+
<Device ID> is the index or name of the target device as listed by $ tns list-devices
432+
<Port> is an accessible port on the device to which you want to attach the debugging tools.
436433

437-
Before building for iOS device, verify that you have configured a valid pair of certificate and provisioning profile on your OS X system.
438-
Connecting to iOS device always uses port 8080, --get-port and --debug-port are not supported.
434+
Before debugging on iOS device, verify that you have configured a valid pair of development certificate and provisioning profile on your OS X system.
439435

440436
Options:
441437
--device - Specifies a connected device on which to run the app.
442-
--emulator - If set, runs the app in the native emulator for the target platform, if configured.
438+
--emulator - (Android-only) Specifies that you want to debug the app in the native Android emulator from the Android SDK.
439+
--geny - (Android-only) Specifies a Genymotion emulator on which you want to debug your app.
440+
--debug-brk - Shorthand for prepare, build and deploy. Prepares, builds and deploys the application package on a device or in an emulator,
441+
launches the app and loads the debug tools in the browser.
442+
For Android, launches the Chrome DevTools of your Chrome browser. You must have Chrome installed on your system.
443+
For iOS, launches the developer tools of your Safari browser.
444+
--start - Attaches the debug tools to a deployed and running app. Your app must be running on device.
445+
--stop - (Android-only) Detaches the debug tools.
446+
--get-port - (Android-only) Retrieves the port on which you are debugging your application.
447+
On iOS devices, this option is not available because the debug tools always attach to port 8080.
448+
--debug-port - (Android-only) Sets a new port on which to attach the debug tools.
449+
On iOS devices, this option is not available because the debug tools always attach to port 8080.
443450

444451
--[/]--
445452

446453
--[emulate]--
447454

448455
Usage:
449-
$ tns emulate emulate <Command> [--release]
456+
$ tns emulate <Command> [--release]
450457

451458
You must run the emulate command with a related command.
452459

0 commit comments

Comments
 (0)