-
Create repository: Click here to create repository with cpm-plugin-gs template.
-
Clone repository:
cpm repo clone <url>- Go to repository:
cpm goto <repo-name>- Fill template repository with actual values: Since this repo created from a template repository there are some variables which need user input before filling.
cpm template fill- Open
./plugin/src/index.tswith your favourite code editor actions: {}object contains all the actions provided by plugin- Key should mention the cpm command which this action handles (ex:
task ls,task get,repo clone) - To view command syntax run
cpm ctxwill contain config (./cpm.yml), variables and secrets store (which you can use to get or store new variables or secrets for plugin)- Use variables file to store values which will be accessed by multiple developers
- Secrets file is only stored at developers machine
inputwill contain all the arguments and options passed for command (according to the command syntax)
- Run
cpminside plugin repository (it should load plugin) - Run any command provided by plugin and plugin should invoke the action
- Change README.md file content with actual content related to plugin (This will be used as the homepage for plugin)
- Login to npm with
npm login - Go to
./pluginfolder - Publish plugin with
npm publish
- Go to repository where you need to install plugin
- Run
cpm install <plugin>with plugin name - Or if you want to install plugin globally run
cpm install <plugin> -g