mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-09-19 23:17:16 +03:00
Remove unused package-lock.json files before building
This commit is contained in:
parent
c97e8f084c
commit
fa96a90e12
@ -58,6 +58,7 @@ const CONFIG = require('./config')
|
||||
let binariesPromise = Promise.resolve()
|
||||
|
||||
if (!argv.existingBinaries) {
|
||||
cleanPackageLock()
|
||||
checkChromedriverVersion()
|
||||
cleanOutputDirectory()
|
||||
copyAssets()
|
||||
|
18
script/lib/clean-package-lock.js
Normal file
18
script/lib/clean-package-lock.js
Normal file
@ -0,0 +1,18 @@
|
||||
// This module exports a function that deletes all `package-lock.json` files that do
|
||||
// not exist under a `node_modules` directory.
|
||||
|
||||
'use strict'
|
||||
|
||||
const CONFIG = require('../config')
|
||||
const fs = require('fs-extra')
|
||||
const glob = require('glob')
|
||||
const path = require('path')
|
||||
|
||||
module.exports = function () {
|
||||
console.log('Deleting problematic package-lock.json files')
|
||||
let paths = glob.sync(path.join(CONFIG.repositoryRootPath, '**', 'package-lock.json'), {ignore: path.join('**', 'node_modules', '**')})
|
||||
|
||||
for (let path of paths) {
|
||||
fs.unlinkSync(path)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user