Merge pull request #1729 from NativeScript/feature/remove-hello-world-template

Removed hello world template
This commit is contained in:
dtopuzov
2016-03-09 15:16:30 +02:00
8 changed files with 1 additions and 98 deletions

View File

@@ -693,11 +693,6 @@
<TypeScriptCompile Include="apps\tests\pages\page7.ts" />
<TypeScriptCompile Include="apps\tests\layouts\grid-layout-tests.ts" />
<TypeScriptCompile Include="apps\tests\layouts\stack-layout-tests.ts" />
<TypeScriptCompile Include="apps\template-hello-world\app.ts" />
<TypeScriptCompile Include="apps\template-hello-world\main-page.ts">
<DependentUpon>main-page.xml</DependentUpon>
</TypeScriptCompile>
<TypeScriptCompile Include="apps\template-hello-world\main-view-model.ts" />
<TypeScriptCompile Include="apps\tests\testRunner.ts" />
<TypeScriptCompile Include="apps\ui-tests-app\app.ts" />
<TypeScriptCompile Include="apps\ui-tests-app\mainPage.ts" />
@@ -1198,7 +1193,6 @@
<Content Include="apps\ui-tests-app\pages\handlers.xml" />
<Content Include="apps\ui-tests-app\pages\i86.xml" />
<Content Include="apps\template-blank\app.css" />
<Content Include="apps\template-hello-world\app.css" />
<Content Include="apps\template-master-detail\app.css" />
<Content Include="apps\template-tab-navigation\app.css" />
<Content Include="apps\ui-tests-app\modal-view\login-page.xml">
@@ -1326,7 +1320,6 @@
</Content>
<Content Include=".gitignore" />
<Content Include="apps\template-blank\main-page.xml" />
<Content Include="apps\template-hello-world\main-page.xml" />
<Content Include="apps\tests\small-image.png" />
<Content Include="apps\tests\pages\page14.xml">
<SubType>Designer</SubType>
@@ -2018,11 +2011,6 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="apps\template-hello-world\package.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="apps\tests\styling\package.json" />
</ItemGroup>
@@ -2205,7 +2193,7 @@
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
</WebProjectProperties>
</FlavorProperties>
<UserProperties ui_2scroll-view_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2editable-text-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2absolute-layout-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2gallery-app_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2content-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2web-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2absolute-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2dock-layout_2package_1json__JSONSchema="" ui_2layouts_2grid-layout_2package_1json__JSONSchema="" ui_2layouts_2wrap-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" />
<UserProperties ui_2layouts_2wrap-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2layouts_2grid-layout_2package_1json__JSONSchema="" ui_2layouts_2dock-layout_2package_1json__JSONSchema="" ui_2layouts_2absolute-layout_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2web-view_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2content-view_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2gallery-app_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2absolute-layout-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" apps_2editable-text-demo_2package_1json__JSONSchema="http://json.schemastore.org/package" ui_2scroll-view_2package_1json__JSONSchema="http://json.schemastore.org/package" />
</VisualStudio>
</ProjectExtensions>
</Project>

View File

@@ -1,16 +0,0 @@
.title {
font-size: 30;
horizontal-align: center;
margin:20;
}
button {
font-size: 42;
horizontal-align: center;
}
.message {
font-size: 20;
color: #284848;
horizontal-align: center;
}

View File

@@ -1,6 +0,0 @@
import application = require("application");
// Remove this in the AppBuilder templates
application.cssFile = "./app.css"
application.start({ moduleName: "main-page" });

View File

@@ -1,10 +0,0 @@
import observable = require("data/observable");
import pages = require("ui/page");
import vmModule = require("./main-view-model");
// Event handler for Page "loaded" event attached in main-page.xml
export function pageLoaded(args: observable.EventData) {
// Get the event sender
var page = <pages.Page>args.object;
page.bindingContext = vmModule.mainViewModel;
}

View File

@@ -1,7 +0,0 @@
<Page xmlns="http://schemas.nativescript.org/tns.xsd" loaded="pageLoaded">
<StackLayout>
<Label text="Tap the button" class="title"/>
<Button text="TAP" tap="{{ tapAction }}" />
<Label text="{{ message }}" class="message" textWrap="true"/>
</StackLayout>
</Page>

View File

@@ -1,41 +0,0 @@
import observable = require("data/observable");
export class HelloWorldModel extends observable.Observable {
private counter: number;
constructor() {
super();
// Initialize default values.
this.counter = 42;
this.set("message", this.counter + " taps left");
}
public tapAction() {
this.counter--;
if (this.counter <= 0) {
this.set("message", "Hoorraaay! You unlocked the NativeScript clicker achievement!");
}
else {
this.set("message", this.counter + " taps left")
}
}
}
export var mainViewModel = new HelloWorldModel();
// Equivalent JS code:
//var observable = require("data/observable");
//
//var counter = 42;
//
//var mainViewModel = new observable.Observable();
//mainViewModel.set("message", counter + " taps left");
//mainViewModel.tapAction = function () {
// counter--;
// if (counter <= 0) {
// mainViewModel.set("message", "Hoorraaay! You unlocked the NativeScript clicker achievement!");
// }
// else {
// mainViewModel.set("message", counter + " taps left");
// }
//};
//exports.mainViewModel = mainViewModel;

View File

@@ -1,2 +0,0 @@
{ "name" : "template-hello-world",
"main" : "app.js" }

View File

@@ -136,9 +136,6 @@
"apps/tab-view-demo/mainPage.ts",
"apps/template-blank/app.ts",
"apps/template-blank/main-page.ts",
"apps/template-hello-world/app.ts",
"apps/template-hello-world/main-page.ts",
"apps/template-hello-world/main-view-model.ts",
"apps/template-master-detail/app.ts",
"apps/template-master-detail/details-page.ts",
"apps/template-master-detail/main-page.ts",