Skip to content

Commit 8cd21b8

Browse files
author
Fatme
authored
Merge pull request #3520 from NativeScript/vladimirov/merge-rel-master
chore: Merge release in master
2 parents 0954b48 + 432d05d commit 8cd21b8

38 files changed

+582
-680
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,25 @@
11
NativeScript CLI Changelog
22
================
33

4+
4.0.0rc (2018, March 23)
5+
==
6+
7+
### New
8+
* [Implemented #3243](https://github.com/NativeScript/nativescript-cli/issues/3243) 'Scss' file changes trigger app refresh instead reloading the view and apply generated 'css'
9+
* [Implemented #3248](https://github.com/NativeScript/nativescript-cli/issues/3248) Support JDK_HOME and JAVA_HOME
10+
* [Implemented #3257](https://github.com/NativeScript/nativescript-cli/issues/3257) Make {N} project structure configurable
11+
* [Implemented #3317](https://github.com/NativeScript/nativescript-cli/issues/3317) Support livesync with webpack
12+
* [Implemented #3449](https://github.com/NativeScript/nativescript-cli/pull/3449) Track Vue.js project type
13+
* [Implemented #3496](https://github.com/NativeScript/nativescript-cli/issues/3496) Generate assets for the mobile application
14+
* [Implemented #3497](https://github.com/NativeScript/nativescript-cli/issues/3497) Command to migrate Android resources to 4.0.0 structure
15+
16+
### Fixed
17+
* [Fixed #3151](https://github.com/NativeScript/nativescript-cli/issues/3151): Install fails if user setting file is not valid json
18+
* [Fixed #3324](https://github.com/NativeScript/nativescript-cli/issues/3324): Error when iOS simulator's window is closed
19+
* [Fixed #3442](https://github.com/NativeScript/nativescript-cli/issues/3442): Unnecessary second build upon `tns run android`
20+
* [Fixed #3451](https://github.com/NativeScript/nativescript-cli/issues/3451): `tns plugin remove` fails with : Cannot convert undefined or null to object
21+
22+
423
3.4.3 (2018, March 02)
524
==
625

docs/man_pages/project/configuration/resources/resources-generate-splashes.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,16 @@ position: 12
66

77
Usage | Synopsis
88
------|-------
9-
`$ tns resources generate splashes <Path to image> [<background>]` | Generate all splashscreens for Android and iOS based on the specified image.
9+
`$ tns resources generate splashes <Path to image> [--background <Color>]` | Generate all splashscreens for Android and iOS based on the specified image.
1010

11-
Generates all icons for Android and iOS platforms and places the generated images in the correct directories under `App_Resources/<platform>` directory.
11+
Generates all splashscreens for Android and iOS platforms and places the generated images in the correct directories under `App_Resources/<platform>` directory.
12+
13+
### Options
14+
* `--background` Sets the background color of the splashscreen. Defaults to white in case it is not specified.
1215

1316
### Attributes
1417
* `<Path to image>` is a valid path to an image that will be used to generate all splashscreens.
15-
* `<background>` is a valid path to an image that will be used as a background of the splashscreen. Defaults to white in case it is not specified.
18+
* `<Color>` is a valid color. It can be represented with string, like `white`, `black`, `blue`, etc. or its HEX representation, for example `#FFFFFF`, `#000000`, `#0000FF`. NOTE: As the `#` is special symbol in some terminals, make sure to place the value in quotes, for example `$ tns resources generate splashes ../myImage.png --background "#FF00FF"`.
1619

1720
<% if(isHtml) { %>
1821
### Related Commands

lib/bootstrap.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ $injector.require("terminalSpinnerService", "./services/terminal-spinner-service
160160

161161
$injector.require('playgroundService', './services/playground-service');
162162
$injector.require("platformEnvironmentRequirements", "./services/platform-environment-requirements");
163-
$injector.require("nativescriptCloudExtensionService", "./services/nativescript-cloud-extension-service");
163+
$injector.require("nativeScriptCloudExtensionService", "./services/nativescript-cloud-extension-service");
164164

165165
$injector.requireCommand("resources|generate|icons", "./commands/generate-assets");
166166
$injector.requireCommand("resources|generate|splashes", "./commands/generate-assets");

lib/commands/create-project.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
import * as constants from "../constants";
2+
import * as path from "path";
23

34
export class CreateProjectCommand implements ICommand {
45
public enableHooks = false;
56
public allowedParameters: ICommandParameter[] = [this.$stringParameterBuilder.createMandatoryParameter("Project name cannot be empty.")];
67

8+
private createdProjecData: ICreateProjectData;
9+
710
constructor(private $projectService: IProjectService,
11+
private $logger: ILogger,
812
private $errors: IErrors,
913
private $options: IOptions,
1014
private $stringParameterBuilder: IStringParameterBuilder) { }
@@ -23,7 +27,7 @@ export class CreateProjectCommand implements ICommand {
2327
selectedTemplate = this.$options.template;
2428
}
2529

26-
await this.$projectService.createProject({
30+
this.createdProjecData = await this.$projectService.createProject({
2731
projectName: args[0],
2832
template: selectedTemplate,
2933
appId: this.$options.appid,
@@ -32,6 +36,13 @@ export class CreateProjectCommand implements ICommand {
3236
ignoreScripts: this.$options.ignoreScripts
3337
});
3438
}
39+
40+
public async postCommandAction(args: string[]): Promise<void> {
41+
const { projectDir } = this.createdProjecData;
42+
const relativePath = path.relative(process.cwd(), projectDir);
43+
this.$logger.printMarkdown(`Now you can navigate to your project with \`$ cd ${relativePath}\``);
44+
this.$logger.printMarkdown(`After that you can run it on device/emulator by executing \`$ tns run <platform>\``);
45+
}
3546
}
3647

3748
$injector.registerCommand("create", CreateProjectCommand);

lib/commands/post-install.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,27 @@ export class PostInstallCliCommand extends PostInstallCommand {
1818

1919
await this.$subscriptionService.subscribeForNewsletter();
2020
}
21+
22+
public async postCommandAction(args: string[]): Promise<void> {
23+
this.$logger.info("You have successfully installed NativeScript CLI.");
24+
this.$logger.info("In order to create a new project, you can use:".green);
25+
this.$logger.printMarkdown("`tns create <app name>`");
26+
this.$logger.info("To build your project locally you can use:".green);
27+
this.$logger.printMarkdown("`tns build <platform>`");
28+
this.$logger.printMarkdown("NOTE: Local builds require additional setup of your environment. You can find more information here: `https://docs.nativescript.org/start/quick-setup`");
29+
30+
// Add a new line just to ensure separation between local builds and cloud builds info.
31+
this.$logger.info("");
32+
this.$logger.info("To build your project in the cloud you can use:".green);
33+
this.$logger.printMarkdown("`tns cloud build <platform>`");
34+
this.$logger.printMarkdown("NOTE: Cloud builds require Telerik account. You can find more information here: `https://docs.nativescript.org/sidekick/intro/requirements`");
35+
36+
this.$logger.info("");
37+
this.$logger.printMarkdown("In case you want to experiment quickly with NativeScript, you can try the Playground: `https://play.nativescript.org`");
38+
39+
this.$logger.info("");
40+
this.$logger.printMarkdown("In case you have any questions, you can check our forum: `https://forum.nativescript.org` and our public Slack channel: `https://nativescriptcommunity.slack.com/`");
41+
}
2142
}
2243

2344
$injector.registerCommand("post-install-cli", PostInstallCliCommand);

lib/commands/run.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export class RunCommandBase implements ICommand {
2828
this.platform = this.$devicePlatformsConstants.Android;
2929
}
3030

31-
this.$liveSyncCommandHelper.validatePlatform(this.platform);
31+
await this.$liveSyncCommandHelper.validatePlatform(this.platform);
3232

3333
return true;
3434
}

lib/commands/setup.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ $injector.registerCommand("setup|*", SetupCommand);
1212
export class CloudSetupCommand implements ICommand {
1313
public allowedParameters: ICommandParameter[] = [];
1414

15-
constructor(private $nativescriptCloudExtensionService: INativescriptCloudExtensionService) { }
15+
constructor(private $nativeScriptCloudExtensionService: INativeScriptCloudExtensionService) { }
1616

1717
public execute(args: string[]): Promise<any> {
18-
return this.$nativescriptCloudExtensionService.install();
18+
return this.$nativeScriptCloudExtensionService.install();
1919
}
2020
}
2121
$injector.registerCommand(["setup|cloud", "cloud|setup"], CloudSetupCommand);

lib/constants.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,10 @@ export const enum TrackActionNames {
135135
CreateProject = "Create project",
136136
Debug = "Debug",
137137
Deploy = "Deploy",
138-
LiveSync = "LiveSync"
138+
LiveSync = "LiveSync",
139+
RunSetupScript = "Run Setup Script",
140+
CheckLocalBuildSetup = "Check Local Build Setup",
141+
CheckEnvironmentRequirements = "Check Environment Requirements"
139142
}
140143

141144
export const enum BuildStates {

lib/declarations.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,12 +788,17 @@ interface IBundleValidatorHelper {
788788
validate(): void;
789789
}
790790

791-
interface INativescriptCloudExtensionService {
791+
interface INativeScriptCloudExtensionService {
792792
/**
793793
* Installs nativescript-cloud extension
794794
* @return {Promise<IExtensionData>} returns the extension data
795795
*/
796796
install(): Promise<IExtensionData>;
797+
/**
798+
* Checks if nativescript-cloud extension is installed
799+
* @return {boolean} returns true in case when nativescript-cloud extension is installed, false otherwise
800+
*/
801+
isInstalled(): boolean
797802
}
798803

799804
/**

0 commit comments

Comments
 (0)