1
0

removeAll.js 769 B

12345678910111213141516171819202122
  1. /*---------------------------------------------------------------------------------------------
  2. * Copyright (c) Microsoft Corporation. All rights reserved.
  3. * Licensed under the MIT License. See License.txt in the project root for license information.
  4. *--------------------------------------------------------------------------------------------*/
  5. //@ts-check
  6. const glob = require('glob');
  7. const path = require('path');
  8. const fs = require('fs');
  9. const { REPO_ROOT } = require('../utils');
  10. const files = glob.sync('**/package-lock.json', {
  11. cwd: REPO_ROOT,
  12. ignore: ['**/node_modules/**', '**/out/**', '**/release/**']
  13. });
  14. for (const file of files) {
  15. const filePath = path.join(REPO_ROOT, file);
  16. console.log(`Deleting ${file}...`);
  17. fs.unlinkSync(filePath);
  18. }