Skip to content

Commit 6ad4678

Browse files
Prepare repo for removing fibers
* Update to TypeScript 2.1.4 * Remove .js files * Add tsconfig.json and transpile to ES6 * Read tsconfig.json in Gruntfile.js * Remove support for Xcode 5 * Merge implementation for Xcode 7 and Xcode 8 * Fix Xcode 6 implementation by adding abstract methods in base class.
1 parent 0a21a08 commit 6ad4678

17 files changed

+45
-310
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "./node_modules/typescript/lib"
3+
}

Gruntfile.js

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,8 @@
1-
module.exports = function(grunt) {
1+
module.exports = function (grunt) {
22
grunt.initConfig({
33
pkg: grunt.file.readJSON("package.json"),
44
ts: {
5-
options: {
6-
target: 'es5',
7-
module: 'commonjs',
8-
sourceMap: true,
9-
declaration: false,
10-
removeComments: false,
11-
noImplicitAny: true
12-
},
5+
options: grunt.file.readJSON("tsconfig.json").compilerOptions,
136
devlib: {
147
src: ["lib/**/*.ts"],
158
reference: "lib/.d.ts"
@@ -44,7 +37,7 @@ module.exports = function(grunt) {
4437
grunt.loadNpmTasks("grunt-ts");
4538
grunt.loadNpmTasks('grunt-shell');
4639

47-
grunt.registerTask("remove_prepublish_script", function() {
40+
grunt.registerTask("remove_prepublish_script", function () {
4841
var packageJson = grunt.file.readJSON("package.json");
4942
delete packageJson.scripts.prepublish;
5043
grunt.file.write("package.json", JSON.stringify(packageJson, null, " "));

lib/command-executor.js

Lines changed: 0 additions & 49 deletions
This file was deleted.

lib/commands/device-types.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

lib/commands/help.js

Lines changed: 0 additions & 32 deletions
This file was deleted.

lib/commands/notify-post.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

lib/commands/sdks.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

lib/declarations.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

lib/errors.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

lib/iphone-interop-simulator-base.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import * as _ from "lodash";
1515
let $ = require("nodobjc");
1616
import {IPhoneSimulatorNameGetter} from "./iphone-simulator-name-getter";
1717

18-
export class IPhoneInteropSimulatorBase extends IPhoneSimulatorNameGetter {
19-
constructor(private simulator: IInteropSimulator) {
18+
export abstract class IPhoneInteropSimulatorBase extends IPhoneSimulatorNameGetter {
19+
constructor() {
2020
super();
2121
}
2222

@@ -31,6 +31,9 @@ export class IPhoneInteropSimulatorBase extends IPhoneSimulatorNameGetter {
3131

3232
private static DEFAULT_TIMEOUT_IN_SECONDS = 90;
3333

34+
public abstract getDevices(): IFuture<IDevice[]>;
35+
public abstract setSimulatedDevice(config: any): void;
36+
3437
public run(appPath: string, applicationIdentifier: string): IFuture<void> {
3538
return this.execute(this.launch, { canRunMainLoop: true, appPath: appPath, applicationIdentifier: applicationIdentifier });
3639
}
@@ -70,7 +73,7 @@ export class IPhoneInteropSimulatorBase extends IPhoneSimulatorNameGetter {
7073

7174
private validateDevice() {
7275
if (options.device) {
73-
let devices = this.simulator.getDevices().wait();
76+
let devices = this.getDevices().wait();
7477
let validDeviceIdentifiers = _.map(devices, device => device.id);
7578
if(!_.contains(validDeviceIdentifiers, options.device)) {
7679
errors.fail("Invalid device identifier %s. Valid device identifiers are %s.", options.device, utils.stringify(validDeviceIdentifiers));
@@ -91,7 +94,7 @@ export class IPhoneInteropSimulatorBase extends IPhoneSimulatorNameGetter {
9194
config("setSimulatedSystemRoot", sdkRoot);
9295

9396
this.validateDevice();
94-
this.simulator.setSimulatedDevice(config);
97+
this.setSimulatedDevice(config);
9598

9699
if (options.logging) {
97100
let logPath = this.createLogPipe(appPath).wait();

0 commit comments

Comments
 (0)