diff --git a/bin/install-addons.js b/bin/install-addons.js index 23ae445a99..83adea1f05 100644 --- a/bin/install-addons.js +++ b/bin/install-addons.js @@ -29,8 +29,6 @@ if (fs.existsSync(addonsPath)) { const addonPath = path.join(addonsPath, folder); // install only if there are dependencies listed - // also skip addon if it does not contain any package.json - // (might happen after branch switches) let packageJson; try { packageJson = require(path.join(addonPath, 'package.json')); diff --git a/package.json b/package.json index 7762cd84bd..1bc7861e06 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,6 @@ "repository": "https://github.com/xtermjs/xterm.js", "license": "MIT", "scripts": { - "postinstall": "node -e \"try { require('./bin/install-addons'); } catch(e) {}\"", "prepackage": "npm run build", "package": "webpack", "start": "node demo/start", @@ -17,6 +16,7 @@ "posttest": "npm run lint", "test-api": "mocha \"**/*.api.js\"", "test-unit": "node ./bin/test.js", + "prebuild": "node ./bin/install-addons.js", "build": "tsc -b ./tsconfig.all.json", "prepare": "npm run build", "prepublishOnly": "npm run package",