Skip to content

Commit 000c639

Browse files
authored
Merge pull request #41 from NativeScript/fatme/app-folder
feat: move all source code to the app folder
2 parents 6d5a1d7 + dd2df8d commit 000c639

23 files changed

+23
-5
lines changed

Diff for: app-root.xml renamed to app/app-root.xml

File renamed without changes.

Diff for: app.css renamed to app/app.css

File renamed without changes.

Diff for: app.ts renamed to app/app.ts

File renamed without changes.
File renamed without changes.

Diff for: bundle-app.ts renamed to app/bundle-app.ts

File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: main-page.ts renamed to app/main-page.ts

File renamed without changes.

Diff for: main-page.xml renamed to app/main-page.xml

File renamed without changes.

Diff for: main-view-model.ts renamed to app/main-view-model.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/// <reference path="./declarations.d.ts"/>
1+
/// <reference path="../declarations.d.ts"/>
22
import { Observable } from "tns-core-modules/data/observable";
33
import { ObservableArray } from "tns-core-modules/data/observable-array";
44
import * as http from "tns-core-modules/http";
@@ -21,7 +21,7 @@ function enableSocketIoDebugging() {
2121
global.window = global;
2222
}
2323

24-
var config: INetworkConfiguration = require('./config');
24+
var config: INetworkConfiguration = require('../config');
2525
config.options = config.options || {};
2626
if (!config.options.appDirectoryRelativePath) {
2727
config.options.appDirectoryRelativePath = "app";
@@ -207,7 +207,7 @@ export class TestBrokerViewModel extends Observable {
207207
};
208208

209209
this.updateView({ serverInfo: `connecting to ${this.baseUrl}`});
210-
let io = require('./socket.io');
210+
let io = require('../socket.io');
211211
const socket = this.socket = io.connect(this.baseUrl, { forceBase64: true });
212212

213213
socket.on('connect', err => {

Diff for: nativescript.png renamed to app/nativescript.png

File renamed without changes.

Diff for: run-details.ts renamed to app/run-details.ts

File renamed without changes.

Diff for: run-details.xml renamed to app/run-details.xml

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

Diff for: test-run-page.ts renamed to app/test-run-page.ts

File renamed without changes.
File renamed without changes.

Diff for: lib/before-liveSync.ts

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = function ($staticConfig, $errors, hookArgs) {
2+
var majorVersionMatch = ($staticConfig.version || '').match(/^(\d+)\./);
3+
var majorVersion = majorVersionMatch && majorVersionMatch[1] && +majorVersionMatch[1];
4+
if (majorVersion && majorVersion < 6) {
5+
var isUsingBundleWorkflow = hookArgs &&
6+
hookArgs.liveSyncData &&
7+
hookArgs.liveSyncData.bundle;
8+
if (isUsingBundleWorkflow) {
9+
var packageJsonData = require("../package.json");
10+
throw new Error("The current version of " + packageJsonData.name + " (" + packageJsonData.version + ") is not compatible with the used CLI: " + $staticConfig.version + ". Please upgrade your NativeScript CLI version (npm i -g nativescript).");
11+
}
12+
}
13+
};

Diff for: package.json

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nativescript-unit-test-runner",
3-
"version": "0.6.4",
3+
"version": "0.7.0",
44
"description": "NativeScript unit test runner component.",
55
"main": "app.js",
66
"scripts": {
@@ -29,7 +29,12 @@
2929
{
3030
"type": "after-prepare",
3131
"script": "./lib/after-prepare.js",
32-
"inject": "true"
32+
"inject": true
33+
},
34+
{
35+
"type": "before-liveSync",
36+
"script": "lib/before-liveSync.js",
37+
"inject": true
3338
}
3439
]
3540
},

0 commit comments

Comments
 (0)