This repository was archived by the owner on Apr 21, 2022. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( / \. o c l i f \. m a n i f e s t \. j s o n $ / , 'oclif.manifest.json' ) )
38- await fs . outputJSON ( pjsonPath , pjson , { spaces : 2 } )
39- }
4035 this . log ( `wrote manifest to ${ file } ` )
4136 }
4237}
You can’t perform that action at this time.
0 commit comments