https://github.com/ejunjsh/mypm
https://github.com/ejunjsh/mypm
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ejunjsh/mypm
- Owner: ejunjsh
- Created: 2018-05-08T09:56:25.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-10T07:13:13.000Z (about 7 years ago)
- Last Synced: 2024-12-29T08:41:58.008Z (4 months ago)
- Language: JavaScript
- Size: 60.5 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mypm
a wrapper of npm. it just pass the arguments to `npm` to do what `npm` to do. for example `mypm install express` equals to `npm install express`.
## install
npm install mypm -g
## why to create this stuff.
if you want to extend `npm` or add some command to `npm`, you just need to extend the `mypm`, just clone the code, add some command code.
for example: if you want to extend the `init` command,just add init command code,the fake code is like below:
src/commands/init.js
//do something before init
preinit();
//do init same as `npm init`
npminit();
// do something after init, you can add some logic to create some template code.
postinit();all is done, build the code and publish to npm,then reinstall the mypm `npm install mypm -g`,ok,you can use the new init command:
mypm init