diff --git a/desktop/pkg/README.md b/desktop/pkg/README.md index 393022cfb..883e0c900 100644 --- a/desktop/pkg/README.md +++ b/desktop/pkg/README.md @@ -15,7 +15,7 @@ $ npm install -g flipper-pkg $ flipper-pkg COMMAND running command... $ flipper-pkg (-v|--version|version) -flipper-pkg/0.35.0 darwin-x64 node-v12.15.0 +flipper-pkg/0.37.0 darwin-x64 node-v12.15.0 $ flipper-pkg --help [COMMAND] USAGE $ flipper-pkg COMMAND @@ -24,25 +24,8 @@ USAGE # Commands -* [`flipper-pkg bundle DIRECTORY`](#flipper-pkg-bundle-directory) * [`flipper-pkg help [COMMAND]`](#flipper-pkg-help-command) - -## `flipper-pkg bundle DIRECTORY` - -bundle a plugin folder into a distributable archive - -``` -USAGE - $ flipper-pkg bundle DIRECTORY - -OPTIONS - -o, --output=output [default: .] Where to output the bundle, file or directory. Defaults to '.'. - -EXAMPLE - $ flipper-pkg bundle path/to/plugin -``` - -_See code: [src/commands/bundle.ts](https://github.com/facebook/flipper/blob/v0.35.0/src/commands/bundle.ts)_ +* [`flipper-pkg pack DIRECTORY`](#flipper-pkg-pack-directory) ## `flipper-pkg help [COMMAND]` @@ -60,6 +43,23 @@ OPTIONS ``` _See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v2.2.3/src/commands/help.ts)_ + +## `flipper-pkg pack DIRECTORY` + +packs a plugin folder into a distributable archive + +``` +USAGE + $ flipper-pkg pack DIRECTORY + +OPTIONS + -o, --output=output [default: .] Where to output the package, file or directory. Defaults to '.'. + +EXAMPLE + $ flipper-pkg pack path/to/plugin +``` + +_See code: [src/commands/pack.ts](https://github.com/facebook/flipper/blob/v0.37.0/src/commands/pack.ts)_ diff --git a/desktop/pkg/package.json b/desktop/pkg/package.json index 368ad5b8d..1798f2fd1 100644 --- a/desktop/pkg/package.json +++ b/desktop/pkg/package.json @@ -37,6 +37,7 @@ "scripts": { "reset": "rimraf lib *.tsbuildinfo", "build": "tsc -b", + "readme": "oclif-dev readme", "postpack": "rimraf oclif.manifest.json", "prepack": "yarn reset && yarn build && oclif-dev manifest && oclif-dev readme", "run": "yarn build && bin/run", diff --git a/desktop/pkg/src/commands/bundle.ts b/desktop/pkg/src/commands/pack.ts similarity index 87% rename from desktop/pkg/src/commands/bundle.ts rename to desktop/pkg/src/commands/pack.ts index dd1ee11b9..514e21175 100644 --- a/desktop/pkg/src/commands/bundle.ts +++ b/desktop/pkg/src/commands/pack.ts @@ -21,25 +21,25 @@ async function deriveOutputFileName(inputDirectory: string): Promise { return `${packageJson.name || ''}-${packageJson.version}.tgz`; } -export default class Bundle extends Command { +export default class Pack extends Command { public static description = - 'bundle a plugin folder into a distributable archive'; + 'packs a plugin folder into a distributable archive'; - public static examples = [`$ flipper-pkg bundle path/to/plugin`]; + public static examples = [`$ flipper-pkg pack path/to/plugin`]; public static flags = { output: flags.string({ char: 'o', default: '.', description: - "Where to output the bundle, file or directory. Defaults to '.'.", + "Where to output the package, file or directory. Defaults to '.'.", }), }; public static args = [{name: 'directory', required: true}]; public async run() { - const {args, flags: parsedFlags} = this.parse(Bundle); + const {args, flags: parsedFlags} = this.parse(Pack); const stat = await fs.lstat(args.directory); if (!stat.isDirectory()) { @@ -94,7 +94,7 @@ export default class Bundle extends Command { const inputDirectory = path.resolve(args.directory); const outputFile = path.resolve(output); - this.log(`⚙️ Bundling ${inputDirectory} to ${outputFile}...`); + this.log(`⚙️ Packing ${inputDirectory} to ${outputFile}...`); cli.action.start('Installing dependencies'); await yarn.install(inputDirectory); @@ -114,6 +114,6 @@ export default class Bundle extends Command { await yarn.pack(inputDirectory, outputFile); cli.action.stop(); - this.log(`✅ Bundled ${inputDirectory} to ${outputFile}`); + this.log(`✅ Packed ${inputDirectory} to ${outputFile}`); } }