command-alias
v0.1.0
Published
[](https://www.npmjs.com/package/command-alias)  [Params
type generateCommandAliasByPlugin = (
source: string,
outDir: string,
options?: Options
) => Promise<void>
type Options = {
filename?: string;
plugins?: string[];
}source
Alias config filepath, support json/yaml format.
- source file yaml example:
part1:
sa: short alias
part2:
saa: short alias with optionA
sab: short alias with optionB- source file json example:
{
"part1": {
"sa": "short alias"
},
"part2": {
"saa": "short alias with optionA",
"sab": "short alias with optionB"
}
}outDir
Alias output directory, all alias files will be placed under outDir.
options
Optional configs.
options.filename
Define the output filename, default is alias.
options.plugins
Define the using plugins to generate, without specifying will use all plugins by default.
Support options:
sh: for bash-like command, likezsh/bashbat: forWindows Commandps1: forWindows PowerShell
Development
Install dependencies:
pnpm installMake changes and run tests:
pnpm run test