mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 11:35:40 +01:00
Convert build scripts to JavaScript.
This commit is contained in:
parent
84665761ff
commit
4bf3b49c41
14 changed files with 231 additions and 233 deletions
23
build/postinstall.ts
Normal file
23
build/postinstall.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import cp = require('child_process');
|
||||
import path = require('path');
|
||||
|
||||
function huskyInstall() {
|
||||
console.log(`Installing husky hooks...`);
|
||||
console.log(`$ husky install`);
|
||||
const result = cp.spawnSync(
|
||||
process.execPath,
|
||||
[path.join(__dirname, '../node_modules/husky/lib/bin.js'), 'install'],
|
||||
{ stdio: 'inherit' }
|
||||
);
|
||||
|
||||
if (result.error || result.status !== 0) {
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
huskyInstall();
|
||||
Loading…
Add table
Add a link
Reference in a new issue