Skip to content

Commit ba590d1

Browse files
Fatme HavaluovaFatme Havaluova
authored andcommitted
* Fix line endings of .npmignore
* Prepublish script * Add bin to package.json
1 parent f5b9557 commit ba590d1

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

.npmignore

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,15 @@
1-
.idea.gitattributes.npmignore*.tgzGruntfile.js*.cmdtscommand.tmp.txt.tscache/bin/ios-sim-portablebin/*.cmdlib/**/*.tslib/**/*.js.map
1+
.idea
2+
.gitattributes
3+
.npmignore
4+
*.tgz
5+
Gruntfile.js
6+
*.cmd
7+
tscommand.tmp.txt
8+
.tscache/
9+
10+
bin/ios-sim-portable
11+
bin/*.cmd
12+
13+
lib/**/*.tsp
14+
lib/**/*.js.map
15+
/usr/local/bin/appbuilder copy

Gruntfile.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@ module.exports = function(grunt) {
1414
src: ["lib/**/*.ts"],
1515
reference: "lib/.d.ts"
1616
}
17+
},
18+
19+
clean: {
20+
src: ["lib/**/*.js*", "*.tgz"]
1721
}
1822
});
1923

24+
grunt.loadNpmTasks("grunt-contrib-clean");
2025
grunt.loadNpmTasks("grunt-ts");
2126

2227
grunt.registerTask("default", "ts:devlib");

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@
44
"description": "",
55
"main": "./lib/ios-sim.js",
66
"scripts": {
7-
"test": "echo \"Error: no test specified\" && exit 1"
7+
"test": "echo \"Error: no test specified\" && exit 1",
8+
"prepublish": "node prepublish.js"
9+
},
10+
"bin": {
11+
"ios-sim-portable": "./bin/ios-sim-portable.js"
812
},
913
"repository": {
1014
"type": "git",
@@ -28,6 +32,7 @@
2832
"yargs": "1.2.2"
2933
},
3034
"devDependencies": {
35+
"grunt-contrib-clean": "0.5.0",
3136
"grunt": "0.4.2",
3237
"grunt-ts": "1.11.2"
3338
}

prepublish.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
var fs = require("fs");
2+
3+
var callback = function() { };
4+
5+
if (!fs.existsSync("lib/ios-sim.js")) {
6+
var grunt = require("grunt");
7+
grunt.cli.tasks = ["ts:devlib"];
8+
grunt.cli(null, callback);
9+
} else {
10+
process.nextTick(callback);
11+
}

0 commit comments

Comments
 (0)