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
File renamed without changes.

app.css renamed to app/app.css

File renamed without changes.

app.ts renamed to app/app.ts

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.

main-view-model.ts renamed to app/main-view-model.ts

Lines changed: 3 additions & 3 deletions
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 => {
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.

lib/before-liveSync.ts

Lines changed: 13 additions & 0 deletions
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+
};

package.json

Lines changed: 7 additions & 2 deletions
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)