Skip to content
This repository was archived by the owner on Apr 21, 2022. It is now read-only.

Commit 75aa0f5

Browse files
committed
fix: use dotfile manifest when set like that in files
1 parent 90d1e74 commit 75aa0f5

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

src/commands/manifest.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,9 @@ export default class Manifest extends Command {
2929
if (process.env.OCLIF_NEXT_VERSION) {
3030
plugin.manifest.version = process.env.OCLIF_NEXT_VERSION
3131
}
32-
const file = path.join(plugin.root, 'oclif.manifest.json')
32+
const dotfile = plugin.pjson.files.find((f: string) => f.endsWith('.oclif.manifest.json'))
33+
const file = path.join(plugin.root, `${dotfile ? '.' : ''}oclif.manifest.json`)
3334
fs.writeFileSync(file, JSON.stringify(plugin.manifest))
34-
if (plugin.pjson.files.find((f: string) => f.endsWith('.oclif.manifest.json'))) {
35-
const pjsonPath = path.join(plugin.root, 'package.json')
36-
const pjson = await fs.readJSON(pjsonPath)
37-
pjson.files = pjson.files.map((f: string) => f.replace(/\.oclif\.manifest\.json$/, 'oclif.manifest.json'))
38-
await fs.outputJSON(pjsonPath, pjson, {spaces: 2})
39-
}
4035
this.log(`wrote manifest to ${file}`)
4136
}
4237
}

0 commit comments

Comments
 (0)