diff --git a/plugins/dev-scripts/bin/blockly-scripts.js b/plugins/dev-scripts/bin/blockly-scripts.js index 8bc5db5311..6661d8a145 100755 --- a/plugins/dev-scripts/bin/blockly-scripts.js +++ b/plugins/dev-scripts/bin/blockly-scripts.js @@ -20,7 +20,6 @@ const availableScripts = [ 'predeploy', 'lint', 'test', - 'postinstall', 'auditFix', ]; diff --git a/plugins/dev-scripts/scripts/postinstall.js b/plugins/dev-scripts/scripts/postinstall.js deleted file mode 100644 index 9b3ea766b3..0000000000 --- a/plugins/dev-scripts/scripts/postinstall.js +++ /dev/null @@ -1,49 +0,0 @@ -/** - * @license - * Copyright 2020 Google LLC - * SPDX-License-Identifier: Apache-2.0 - */ - -/** - * @fileoverview A 'postinstall' script for Blockly extension packages. - * This script: - * Completes post install tasks if necessary. - * @author samelh@google.com (Sam El-Husseini) - */ - -'use strict'; - -const fs = require('fs'); -const path = require('path'); -const execSync = require('child_process').execSync; - -const appDirectory = fs.realpathSync(process.cwd()); -const resolveApp = (relativePath) => path.resolve(appDirectory, relativePath); - -const packageJson = require(resolveApp('package.json')); -const blocklyNodeModulesPath = resolveApp('node_modules/blockly'); - -// Check if we have installed blockly from git instead of npm. -const blocklyDependency = - (packageJson.dependencies && packageJson.dependencies['blockly']) || - (packageJson.devDependencies && packageJson.devDependencies['blockly']); - -if (!blocklyDependency) { - return; -} - -if (blocklyDependency.indexOf('git://') !== 0) { - return; -} - -// Blockly was installed from a Git repo. Install and build. -console.log(`Running postinstall steps for ${packageJson.name}`); - -// Run npm install. -execSync(`npm install`, {cwd: blocklyNodeModulesPath, stdio: [0, 1, 2]}); - -// Build. -execSync(`npm run build`, {cwd: blocklyNodeModulesPath, stdio: [0, 1, 2]}); - -// Package. -execSync(`npm run package`, {cwd: blocklyNodeModulesPath, stdio: [0, 1, 2]}); diff --git a/plugins/renderer-inline-row-separators/package.json b/plugins/renderer-inline-row-separators/package.json index f941ab9eb1..8b082a3a8a 100644 --- a/plugins/renderer-inline-row-separators/package.json +++ b/plugins/renderer-inline-row-separators/package.json @@ -8,7 +8,6 @@ "clean": "blockly-scripts clean", "lint": "blockly-scripts lint", "predeploy": "blockly-scripts predeploy", - "postinstall": "blockly-scripts postinstall", "start": "blockly-scripts start", "test": "blockly-scripts test" }, diff --git a/plugins/shadow-block-converter/package.json b/plugins/shadow-block-converter/package.json index 3865bb40f0..8391a4aec9 100644 --- a/plugins/shadow-block-converter/package.json +++ b/plugins/shadow-block-converter/package.json @@ -8,7 +8,6 @@ "clean": "blockly-scripts clean", "lint": "blockly-scripts lint", "predeploy": "blockly-scripts predeploy", - "postinstall": "blockly-scripts postinstall", "start": "blockly-scripts start", "test": "blockly-scripts test" }, diff --git a/plugins/strict-connection-checker/package.json b/plugins/strict-connection-checker/package.json index f4c4015d8c..1f9f8fc266 100644 --- a/plugins/strict-connection-checker/package.json +++ b/plugins/strict-connection-checker/package.json @@ -8,7 +8,6 @@ "clean": "blockly-scripts clean", "lint": "blockly-scripts lint", "predeploy": "blockly-scripts predeploy", - "postinstall": "blockly-scripts postinstall", "start": "blockly-scripts start", "test": "blockly-scripts test" },