# @heyoo/plugins-js-template

> heyoo's plugins javascript template

Latest version **1.0.0** (published 2021-09-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install @heyoo/plugins-js-template
pnpm add @heyoo/plugins-js-template
yarn add @heyoo/plugins-js-template
bun add @heyoo/plugins-js-template
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-09-16 |
| First published | 2021-09-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM |
| Node | ^12.20.0 \|\| ^14.13.1 \|\| >=16.0.0 |
| Dependencies | 0 |
| Unpacked size | 2.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Haolin |
| Maintainers | aircan |

## Links

- npm: https://www.npmjs.com/package/@heyoo/plugins-js-template
- Repository: https://github.com/hey-yoo/heyoo-template
- Homepage: https://github.com/hey-yoo/heyoo-template/tree/plugins-js-template#readme
- Issues: https://github.com/hey-yoo/heyoo-template/issues
- npm.io page: https://npm.io/package/@heyoo/plugins-js-template

## Recent versions

- 1.0.0 (latest) — 2021-09-16

## README

# @heyoo/plugins-js-template

This project is the [heyoo](https://github.com/hey-yoo/heyoo) Command line tool's plugins template with javascript.

Before go on, you must install [heyoo](https://github.com/hey-yoo/heyoo) in global.

## Usage

install:

```shell
hey install @heyoo/plugins-js-template
```

exec the plugins commands:

```shell
hey foo
# or
hey bar
```

## Develop packs template

```shell
hey create plugins
# choose plugins-js-template and follow the other prompts

# the pluginsName is what you input by prompts
cd ./pluginsName

hey link
```

### Notice

* package.json must have `exports` attribute, its value type must be string:

```json5
{
  "type": "module",
  "exports": "./src/index.js"
}
```

* exports targets must export default a command array:

```typescript
interface command {
  command: string;
  action: (...args: any[]) => void | Promise<void>;
  option?: string[][];
  requiredOption?: string[][];
  argument?: string[][];
  description?: string;
}

export default [] as command[];
```

You can read this [document](https://github.com/tj/commander.js#readme) to learn more about the interface command's attrtibute.

---
_Source: https://npm.io/package/@heyoo/plugins-js-template · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
