monaco-editor/build/npm/removeAll.ts

21 lines
719 B
TypeScript
Raw Permalink Normal View History

2021-11-16 16:23:03 +08:00
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
2022-02-03 21:56:52 +08:00
import glob from 'glob';
import path from 'path';
import fs from 'fs';
import { REPO_ROOT } from '../utils';
2021-11-16 16:23:03 +08:00
const files = glob.sync('**/package-lock.json', {
cwd: REPO_ROOT,
ignore: ['**/node_modules/**', '**/out/**']
2021-11-16 16:23:03 +08:00
});
for (const file of files) {
const filePath = path.join(REPO_ROOT, file);
console.log(`Deleting ${file}...`);
fs.unlinkSync(filePath);
}