Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

fix-package-json.js

20 lines463 Bytes

1const fs = require('fs')
2​
3const root = __dirname + '/../'
4const packageJsonPath = root + 'package.json'
5​
6function removePrivate(name) {
7 const pkg = require(name)
8 if (pkg.private === true) {
9 pkg.private = false
10 fs.writeFileSync(name, JSON.stringify(pkg, null, 2))
11 }
13​
14removePrivate(packageJsonPath)
15​
16const packageJson = require(packageJsonPath)
17​
18packageJson.workspaces.forEach((workspace) => {
19 removePrivate(root + workspace + '/package.json')
20})