Skip to content

Commit 03435a9

Browse files
committed
use prebuild instead of postinstall
1 parent 04f828b commit 03435a9

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

Diff for: bin/install-addons.js

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ if (fs.existsSync(addonsPath)) {
2929
const addonPath = path.join(addonsPath, folder);
3030

3131
// install only if there are dependencies listed
32-
// also skip addon if it does not contain any package.json
33-
// (might happen after branch switches)
3432
let packageJson;
3533
try {
3634
packageJson = require(path.join(addonPath, 'package.json'));

Diff for: package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"repository": "https://github.com/xtermjs/xterm.js",
99
"license": "MIT",
1010
"scripts": {
11-
"postinstall": "node -e \"try { require('./bin/install-addons'); } catch(e) {}\"",
1211
"prepackage": "npm run build",
1312
"package": "webpack",
1413
"start": "node demo/start",
@@ -17,6 +16,7 @@
1716
"posttest": "npm run lint",
1817
"test-api": "mocha \"**/*.api.js\"",
1918
"test-unit": "node ./bin/test.js",
19+
"prebuild": "node ./bin/install-addons.js",
2020
"build": "tsc -b ./tsconfig.all.json",
2121
"prepare": "npm run build",
2222
"prepublishOnly": "npm run package",

0 commit comments

Comments
 (0)