monaco-editor/build/npm/removeAll.js

23 lines
769 B
JavaScript
Raw 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.
*--------------------------------------------------------------------------------------------*/
//@ts-check
const glob = require('glob');
const path = require('path');
const fs = require('fs');
2021-11-16 17:18:57 +08:00
const { REPO_ROOT } = require('../utils');
2021-11-16 16:23:03 +08:00
const files = glob.sync('**/package-lock.json', {
cwd: REPO_ROOT,
ignore: ['**/node_modules/**', '**/out/**', '**/release/**']
});
for (const file of files) {
const filePath = path.join(REPO_ROOT, file);
console.log(`Deleting ${file}...`);
fs.unlinkSync(filePath);
}