A mos plugin for creating installation section
npm install --save mos-plugin-installationAdd this code snippet to your README.md
<!--@installation()-->
<!--/@-->Run mos in the terminal.
You'll get an installation section in your README that will instruct how to install the package via npm.
The plugin will use information from the package.json in order to figure out what should the installation command look like.
- If there is a
preferGlobal: truespecified in thepackage.json, the generated command will benpm install --global - If there is a
preferDev: truespecified in thepackage.json, the generated command will benpm install --save-dev - If there is a
private: true, the command instruction will suggest to clone the repo and install its dependencies - Otherwise, the generated command will be
npm install --save
If the package has peerDependencies, the installation command will suggest to install all the peer dependencies with the package.
installation(opts)
opts.useShortAlias- Boolean, false by default. If true, uses shorter aliases in the installation command.iinstead ofinstall,-Sinstead of--save, etc.