Skip to content

feat: move all source code to the app folder #41

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
6 changes: 3 additions & 3 deletions main-view-model.ts → app/main-view-model.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference path="./declarations.d.ts"/>
/// <reference path="../declarations.d.ts"/>
import { Observable } from "tns-core-modules/data/observable";
import { ObservableArray } from "tns-core-modules/data/observable-array";
import * as http from "tns-core-modules/http";
Expand All @@ -21,7 +21,7 @@ function enableSocketIoDebugging() {
global.window = global;
}

var config: INetworkConfiguration = require('./config');
var config: INetworkConfiguration = require('../config');
config.options = config.options || {};
if (!config.options.appDirectoryRelativePath) {
config.options.appDirectoryRelativePath = "app";
Expand Down Expand Up @@ -207,7 +207,7 @@ export class TestBrokerViewModel extends Observable {
};

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

socket.on('connect', err => {
Expand Down
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.
13 changes: 13 additions & 0 deletions lib/before-liveSync.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
module.exports = function ($staticConfig, $errors, hookArgs) {
var majorVersionMatch = ($staticConfig.version || '').match(/^(\d+)\./);
var majorVersion = majorVersionMatch && majorVersionMatch[1] && +majorVersionMatch[1];
if (majorVersion && majorVersion < 6) {
var isUsingBundleWorkflow = hookArgs &&
hookArgs.liveSyncData &&
hookArgs.liveSyncData.bundle;
if (isUsingBundleWorkflow) {
var packageJsonData = require("../package.json");
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).");
}
}
};
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-unit-test-runner",
"version": "0.6.4",
"version": "0.7.0",
"description": "NativeScript unit test runner component.",
"main": "app.js",
"scripts": {
Expand Down Expand Up @@ -29,7 +29,12 @@
{
"type": "after-prepare",
"script": "./lib/after-prepare.js",
"inject": "true"
"inject": true
},
{
"type": "before-liveSync",
"script": "lib/before-liveSync.js",
"inject": true
}
]
},
Expand Down