feat(cli): helper messages
This commit is contained in:
parent
9e73837635
commit
2f4d3142cf
5 changed files with 14 additions and 2 deletions
|
@ -11,6 +11,10 @@ import { readFileAsync, writeFileAsync } from './utils'
|
|||
const debug = debugFactory('artifacts')
|
||||
|
||||
export class ArtifactsCommand extends Command {
|
||||
static usage = Command.Usage({
|
||||
description: 'Copy artifacts from Github Actions into specified dir',
|
||||
})
|
||||
|
||||
@Command.String('-d,--dir')
|
||||
sourceDir = 'artifacts'
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ const debug = debugFactory('build')
|
|||
|
||||
export class BuildCommand extends Command {
|
||||
static usage = Command.Usage({
|
||||
description: 'Copy native module into specified dir',
|
||||
description: 'Build and copy native module into specified dir',
|
||||
})
|
||||
|
||||
@Command.Boolean(`--platform`)
|
||||
|
|
|
@ -13,6 +13,10 @@ import { writeFileAsync } from './utils'
|
|||
const debug = debugFactory('create-npm-dir')
|
||||
|
||||
export class CreateNpmDirCommand extends Command {
|
||||
static usage = Command.Usage({
|
||||
description: 'Create npm packages dir for platforms',
|
||||
})
|
||||
|
||||
@Command.String('-t,--target')
|
||||
targetDir!: string
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ import { PrePublishCommand } from './pre-publish'
|
|||
import { VersionCommand } from './version'
|
||||
|
||||
const cli = new Cli({
|
||||
binaryName: 'bin',
|
||||
binaryName: 'napi',
|
||||
binaryVersion: require('../package.json').version,
|
||||
})
|
||||
|
||||
|
|
|
@ -11,6 +11,10 @@ import { updatePackageJson } from './update-package'
|
|||
const debug = debugFactory('version')
|
||||
|
||||
export class VersionCommand extends Command {
|
||||
static usage = Command.Usage({
|
||||
description: 'Update versions in created npm dir',
|
||||
})
|
||||
|
||||
static async updatePackageJson(prefix: string, configFileName?: string) {
|
||||
const { version, platforms } = getNapiConfig(configFileName)
|
||||
for (const platformDetail of platforms) {
|
||||
|
|
Loading…
Reference in a new issue