napi-rs/cli/src/index.ts
forehal a781a4f27e feat(cli): brand new cli tool with both cli and programmatical usage (#1492)
BREAKING CHANGE: requires node >= 16 and some cli options have been renamed
2023-04-06 11:04:53 +08:00

31 lines
769 B
TypeScript

import { collectArtifacts } from './api/artifacts.js'
import { buildProject } from './api/build.js'
import { createNpmDirs } from './api/create-npm-dirs.js'
import { newProject } from './api/new.js'
import { prePublish } from './api/pre-publish.js'
import { renameProject } from './api/rename.js'
import { universalizeBinaries } from './api/universalize.js'
import { version } from './api/version.js'
/**
*
* @usage
*
* ```ts
* const cli = new NapiCli()
*
* cli.build({
* cwd: '/path/to/your/project',
* })
* ```
*/
export class NapiCli {
artifacts = collectArtifacts
new = newProject
build = buildProject
createNpmDirs = createNpmDirs
prePublish = prePublish
rename = renameProject
universalize = universalizeBinaries
version = version
}