mirror of
https://github.com/gwenhael-le-moine/ledgerrb.git
synced 2024-11-17 07:48:59 +01:00
19 lines
483 B
JavaScript
19 lines
483 B
JavaScript
|
const fs = require('fs')
|
||
|
const wipeDependencies = () => {
|
||
|
const file = fs.readFileSync('package.json')
|
||
|
const content = JSON.parse(file)
|
||
|
for (const devDep in content.devDependencies) {
|
||
|
content.devDependencies[devDep] = '*'
|
||
|
}
|
||
|
for (const dep in content.dependencies) {
|
||
|
content.dependencies[dep] = '*'
|
||
|
}
|
||
|
fs.writeFileSync('package.json', JSON.stringify(content))
|
||
|
}
|
||
|
|
||
|
if (require.main === module) {
|
||
|
wipeDependencies()
|
||
|
} else {
|
||
|
module.exports = wipeDependencies
|
||
|
}
|