Skip to content

Commit 052a397

Browse files
author
Tsvetan Raikov
committed
Merge branch 'master' into release
2 parents d778200 + 3effe5f commit 052a397

File tree

93 files changed

+2839
-2650
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+2839
-2650
lines changed

.gitignore

+5-2
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ results
2929
scratch/
3030
.idea/
3131
.settings/
32-
.vscode/
32+
.vscode/**
33+
!.vscode/launch.json
3334
test-reports.xml
3435

3536
npm-debug.log
3637
node_modules
37-
docs/html
38+
docs/html
39+
40+
!test-scripts/*.js

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[submodule "lib/common"]
22
path = lib/common
3-
url = git@github.com:telerik/mobile-cli-lib.git
3+
url = https://github.com/telerik/mobile-cli-lib.git

.npmignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,12 @@ lib/**/*.ts
2121
lib/**/*.js.map
2222

2323
test/
24+
test-scripts/
2425
.vscode
2526
lib/common/test/
2627
coverage/
2728
scratch/
2829
*.suo
2930
.travis.yml
3031
docs/html/
31-
dev/
32+
dev/

.travis.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,10 @@ language: node_js
77
node_js:
88
- '4'
99
git:
10-
submodules: false
10+
submodules: true
1111
before_script:
12-
- sed -i 's/[email protected]:/https:\/\/github.com\//' .gitmodules
13-
- git submodule update --init --recursive
1412
- npm install grunt
1513
- node_modules/.bin/grunt enableScripts:false
16-
- npm install
1714
- grunt rebuild
1815
- ./bin/nativescript error-reporting disable # force ~/.local dir creation -- some tests rely on it
1916
- ./bin/nativescript usage-reporting disable
@@ -44,5 +41,5 @@ deploy:
4441
4542
on:
4643
branch: master
47-
api_key:
44+
api_key:
4845
secure: Ugq6m/y4P5gF15zffYzTKhusn1Csu3ymYLdD+yXgyK3hek9Ms5PKTz4MKgPinlViRCBoQV2fGh0JsCikawIpmQyD+M+FRDKlP2GcXPhFmSN1wVEloxTCwe7H6m7Kl9mo+MJOTS0BN7waCc6yTJBJPxo5nwFgz+DT2srIYndA2h4=

.vscode/launch.json

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
// Use IntelliSense to learn about possible Node.js debug attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"type": "node",
9+
"request": "launch",
10+
"cwd": "${workspaceRoot}/scratch",
11+
"sourceMaps": true,
12+
"name": "Launch CLI (Node 6+)",
13+
"program": "${workspaceRoot}/lib/nativescript-cli.js",
14+
15+
// example commands
16+
"args": [ "create", "cliapp"]
17+
// "args": [ "platform", "add", "[email protected]", "--path", "cliapp"]
18+
// "args": [ "platform", "remove", "android", "--path", "cliapp"]
19+
// "args": [ "plugin", "add", "nativescript-barcodescanner", "--path", "cliapp"]
20+
// "args": [ "plugin", "remove", "nativescript-barcodescanner", "--path", "cliapp"]
21+
// "args": [ "build", "android", "--path", "cliapp"]
22+
// "args": [ "run", "android", "--path", "cliapp"]
23+
// "args": [ "debug", "android", "--path", "cliapp"]
24+
// "args": [ "livesync", "android", "--path", "cliapp"]
25+
// "args": [ "livesync", "android", "--watch", "--path", "cliapp"]
26+
},
27+
{
28+
// in case you want to debug a single test, modify it's code to be `it.only(...` instead of `it(...`
29+
"type": "node",
30+
"request": "launch",
31+
"name": "Launch Tests (Node 6+)",
32+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
33+
"cwd": "${workspaceRoot}",
34+
"sourceMaps": true
35+
},
36+
37+
{
38+
"type": "node",
39+
"runtimeArgs": [
40+
"--harmony"
41+
],
42+
"request": "launch",
43+
"name": "Launch CLI (Node 4, Node 5)",
44+
"program": "${workspaceRoot}/lib/nativescript-cli.js",
45+
"cwd": "${workspaceRoot}",
46+
"sourceMaps": true,
47+
// define the arguments that you would like to pass to CLI, for example
48+
// "args": [ "build", "android", "--justlaunch" ]
49+
"args": [
50+
51+
]
52+
},
53+
54+
{
55+
// in case you want to debug a single test, modify it's code to be `it.only(...` instead of `it(...`
56+
"type": "node",
57+
"runtimeArgs": [
58+
"--harmony"
59+
],
60+
"request": "launch",
61+
"name": "Launch Tests (Node 4, Node 5)",
62+
"program": "${workspaceRoot}/node_modules/mocha/bin/_mocha",
63+
"cwd": "${workspaceRoot}",
64+
"sourceMaps": true
65+
},
66+
67+
{
68+
"type": "node",
69+
"request": "attach",
70+
"name": "Attach to Process",
71+
"port": 5858,
72+
"sourceMaps": true
73+
}
74+
75+
]
76+
}

CocoaPods.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ You need to install CocoaPods. If you haven't yet, you can do so by running:
1515
```bash
1616
$ sudo gem install cocoapods
1717
```
18-
> **NOTE:** All operations and code in this article are verified against CocoaPods 0.38.2.
18+
> **NOTE:** The minimum required version of CocoaPods is 1.0.0.
1919
2020
To check your current version, run the following command.
2121

Gruntfile.js

+13-10
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,7 @@ module.exports = function(grunt) {
2828

2929
pkg: grunt.file.readJSON("package.json"),
3030
ts: {
31-
options: {
32-
target: 'es5',
33-
module: 'commonjs',
34-
sourceMap: true,
35-
declaration: false,
36-
removeComments: false,
37-
noImplicitAny: true,
38-
experimentalDecorators: true
39-
},
31+
options: grunt.file.readJSON("tsconfig.json").compilerOptions,
4032

4133
devlib: {
4234
src: ["lib/**/*.ts", "!lib/common/node_modules/**/*.ts"],
@@ -131,7 +123,18 @@ module.exports = function(grunt) {
131123
},
132124

133125
clean: {
134-
src: ["test/**/*.js*", "lib/**/*.js*", "!lib/common/vendor/*.js", "!lib/common/**/*.json", "!lib/common/Gruntfile.js", "!lib/common/node_modules/**/*", "!lib/common/hooks/**/*.js", "!lib/common/bin/*.js", "*.tgz"]
126+
src: ["test/**/*.js*",
127+
"lib/**/*.js*",
128+
"!test-scripts/**/*",
129+
"!lib/common/vendor/*.js",
130+
"!lib/common/**/*.json",
131+
"!lib/common/Gruntfile.js",
132+
"!lib/common/node_modules/**/*",
133+
"!lib/common/hooks/**/*.js",
134+
"!lib/common/bin/*.js",
135+
"!lib/common/test-scripts/**/*",
136+
"!lib/common/scripts/**/*",
137+
"*.tgz"]
135138
}
136139
});
137140

README.md

+12-22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<<<<<<< HEAD
12
NativeScript Command-Line Interface
23
================
34
Master Branch [![Build Status](https://travis-ci.org/NativeScript/nativescript-cli.svg?branch=build)][2].
@@ -629,27 +630,16 @@ License
629630
===
630631
631632
This software is licensed under the Apache 2.0 license, quoted <a href="LICENSE" target="_blank">here</a>.
633+
=======
634+
# What is NativeScript
635+
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.
632636
633-
[Back to Top][1]
637+
# What is NativeScript Command Line Interface (CLI)
638+
The NativeScript CLI lets you create, build, and deploy NativeScript-based projects on iOS and Android devices.
639+
>>>>>>> master
640+
641+
# Get started
642+
To learn more about how to use NativeScript, please follow our [getting started article](http://docs.nativescript.org). To see what commands are available in the CLI please type `tns --help` in the console after installing the CLI.
634643
635-
[1]: #telerik-nativescript-command-line-interface
636-
[2]: https://travis-ci.org/NativeScript/nativescript-cli
637-
[3]: http://docs.telerik.com/platform/appbuilder/nativescript/index
638-
[4]: http://www.telerik.com/nativescript
639-
[6]: https://github.com/nativescript/docs/wiki
640-
[7]: https://github.com/nativescript/docs
641-
[8]: http://www.telerik.com/nativescript/faq
642-
[9]: http://developer.telerik.com/featured/nativescript-a-technical-overview/
643-
[10]: http://developer.telerik.com/featured/nativescript-android/
644-
[11]: http://blogs.telerik.com/valentinstoychev/posts.aspx/14-06-12/announcing-nativescript---cross-platform-framework-for-building-native-mobile-applications
645-
[12]: https://developer.apple.com/xcode/downloads/
646-
[13]: https://rubygems.org/gems/xcodeproj/versions/0.28.2
647-
[Chocolatey]: https://chocolatey.org/
648-
[JDK 8]: http://www.oracle.com/technetwork/java/javase/downloads/index.html
649-
[Android SDK 22]: http://developer.android.com/sdk/index.html
650-
[Genymotion]: https://www.genymotion.com/#!/
651-
[CocoaPods]: https://guides.cocoapods.org/using/getting-started.html#getting-started
652-
[xcproj]: https://github.com/0xced/xcproj#installation
653-
[Android SDK Build-tools 23.0.0]: http://developer.android.com/sdk/index.html
654-
[Android Support Repository]: http://developer.android.com/sdk/index.html
655-
![](https://ga-beacon.appspot.com/UA-111455-24/nativescript/nativescript-cli?pixel)
644+
# License
645+
Apache 2.0

bin/nativescript

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#!/bin/sh
1+
#!/usr/bin/env node
22

3-
AB_DIR="`dirname \"$0\"`"
4-
node "$AB_DIR/nativescript.js" "$@"
3+
require("./tns");

bin/nativescript.cmd

-1
This file was deleted.

bin/nativescript.js

-4
This file was deleted.

bin/tns

+35-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,36 @@
1-
#!/bin/sh
1+
#!/usr/bin/env node
22

3-
AB_DIR="`dirname \"$0\"`"
4-
node "$AB_DIR/nativescript.js" "$@"
3+
"use strict";
4+
var path = require("path"),
5+
node = require("../package.json").engines.node,
6+
pathToLib = path.join(__dirname, "..", "lib"),
7+
pathToCommon = path.join(pathToLib, "common");
8+
9+
require(path.join(pathToCommon, "verify-node-version")).verifyNodeVersion(node, "NativeScript");
10+
11+
var pathToCliExecutable = path.join(pathToLib, "nativescript-cli.js");
12+
13+
var nodeArgs = require(path.join(pathToCommon, "scripts", "node-args")).getNodeArgs();
14+
15+
if (nodeArgs.length) {
16+
// We need custom args for Node process, so pass them here.
17+
var childProcess = require("child_process");
18+
var args = process.argv;
19+
20+
// Remove `node` and `nativescript` from the arguments.
21+
args.shift();
22+
args.shift();
23+
24+
args.unshift(pathToCliExecutable);
25+
26+
args = nodeArgs.concat(args);
27+
28+
var nodeProcess = childProcess.spawn(process.execPath, args, { stdio: "inherit" });
29+
30+
nodeProcess.on("close", function(code) {
31+
// We need this handler so if command fails, we'll exit with same exit code as CLI.
32+
process.exit(code);
33+
});
34+
} else {
35+
require(pathToCliExecutable);
36+
}

bin/tns.cmd

-1
This file was deleted.

0 commit comments

Comments
 (0)