@ts-common/azure-js-dev-tools
Version:
Developer dependencies for TypeScript related projects
26 lines • 949 B
JavaScript
;
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.npmInstall = exports.npmRunBuild = exports.execute = void 0;
var tslib_1 = require("tslib");
var child_process_1 = require("child_process");
var fssync = tslib_1.__importStar(require("fs"));
function execute(command, packageFolderPath) {
if (fssync.existsSync(packageFolderPath)) {
child_process_1.execSync(command, { cwd: packageFolderPath, stdio: "inherit" });
}
}
exports.execute = execute;
function npmRunBuild(packageFolderPath) {
execute("npm run build", packageFolderPath);
}
exports.npmRunBuild = npmRunBuild;
function npmInstall(packageFolderPath) {
execute("npm install", packageFolderPath);
}
exports.npmInstall = npmInstall;
//# sourceMappingURL=execute.js.map