@heyoo/plugins-js-template
v1.0.0
Published
heyoo's plugins javascript template
Downloads
2
Readme
@heyoo/plugins-js-template
This project is the heyoo Command line tool's plugins template with javascript.
Before go on, you must install heyoo in global.
Usage
install:
hey install @heyoo/plugins-js-template
exec the plugins commands:
hey foo
# or
hey bar
Develop packs template
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:
{
"type": "module",
"exports": "./src/index.js"
}
- exports targets must export default a command array:
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 to learn more about the interface command's attrtibute.