简体中文 | English
Centralized management of node
commands
npm install -g ly-command
- Initialize your project with
npm init -y
{
"name": "hello", // Command name
"version": "1.0.0", // Version number
"description": "first command", // Command description
"main": "index.js" // Entry file, can be a js/ts file
}
- Create
index.js
// index.js
console.log("hello ly");
- Run Debugging
Execute the script command ly start
in the project root directory.
- Publish Command Locally
In the project root directory, execute ly publish
.
- Execute the Published Command
Run ly run hello
or ly hello
.
Command | Description |
---|---|
ly install <commandName> | Install remote command |
ly login | Login |
ly start | Start executing command |
ly run <commandName> | Run command |
ly list | Show all commands |
ly remove <commandName> | Remove specified command |
ly clear | Clear all commands |
ly publish | Publish command locally |
ly publish -r | Publish to remote |