Skip to content

Commit d48dd0a

Browse files
Separate entry points
Separate entry points when the module is required and when it is used as standalone application. This way when it is required, the help will not be printed. Remove postinstall script as it is not used anymore.
1 parent 10893ba commit d48dd0a

File tree

5 files changed

+8
-33
lines changed

5 files changed

+8
-33
lines changed

bin/ios-sim-portable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
#!/usr/bin/env node
2-
require("../lib/ios-sim.js");
2+
require("../lib/ios-sim-standalone.js");

lib/ios-sim-standalone.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
import commandExecutorLibPath = require("./command-executor");
2+
3+
var commandExecutor: ICommandExecutor = new commandExecutorLibPath.CommandExecutor();
4+
commandExecutor.execute();

lib/ios-sim.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
import * as _ from "lodash";
22

3-
import commandExecutorLibPath = require("./command-executor");
4-
5-
var commandExecutor: ICommandExecutor = new commandExecutorLibPath.CommandExecutor();
6-
commandExecutor.execute();
7-
83
function getSimulator(): ISimulator {
94
let libraryPath = require("./iphone-simulator");
105
let obj = new libraryPath.iPhoneSimulator();

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
{
22
"name": "ios-sim-portable",
3-
"version": "1.6.1",
3+
"version": "2.0.0",
44
"description": "",
55
"main": "./lib/ios-sim.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1",
8-
"prepublish": "node prepublish.js",
9-
"postinstall": "node postinstall.js"
7+
"test": "echo \"Error: no test specified\" && exit 1"
108
},
119
"bin": {
1210
"ios-sim-portable": "./bin/ios-sim-portable.js",
@@ -45,4 +43,4 @@
4543
"engines": {
4644
"node": ">=4.2.1 <5.0.0 || >=5.1.0 <8.0.0"
4745
}
48-
}
46+
}

postinstall.js

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

0 commit comments

Comments
 (0)