mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 07:00:11 +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
|
|
@ -3,14 +3,12 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
|
||||
const glob = require('glob');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const cp = require('child_process');
|
||||
import glob = require('glob');
|
||||
import path = require('path');
|
||||
import fs = require('fs');
|
||||
import cp = require('child_process');
|
||||
const npm = process.platform === 'win32' ? 'npm.cmd' : 'npm';
|
||||
const { REPO_ROOT } = require('../utils');
|
||||
import { REPO_ROOT } from '../utils';
|
||||
|
||||
const files = glob.sync('**/package.json', {
|
||||
cwd: REPO_ROOT,
|
||||
|
|
@ -29,18 +27,16 @@ for (const file of files) {
|
|||
}
|
||||
|
||||
function npmInstall(location) {
|
||||
/** @type {'inherit'} */
|
||||
const stdio = 'inherit';
|
||||
const opts = {
|
||||
env: process.env,
|
||||
cwd: location,
|
||||
stdio
|
||||
};
|
||||
const args = ['install'];
|
||||
|
||||
console.log(`Installing dependencies in ${location}...`);
|
||||
console.log(`$ npm ${args.join(' ')}`);
|
||||
const result = cp.spawnSync(npm, args, opts);
|
||||
const result = cp.spawnSync(npm, args, {
|
||||
env: process.env,
|
||||
cwd: location,
|
||||
stdio
|
||||
});
|
||||
|
||||
if (result.error || result.status !== 0) {
|
||||
process.exit(1);
|
||||
|
|
@ -3,12 +3,10 @@
|
|||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
|
||||
const glob = require('glob');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
const { REPO_ROOT } = require('../utils');
|
||||
import glob from 'glob';
|
||||
import path from 'path';
|
||||
import fs from 'fs';
|
||||
import { REPO_ROOT } from '../utils';
|
||||
|
||||
const files = glob.sync('**/package-lock.json', {
|
||||
cwd: REPO_ROOT,
|
||||
Loading…
Add table
Add a link
Reference in a new issue