mos-plugin-installation

1.2.2 • Public • Published

mos-plugin-installation

A mos plugin for creating installation section

npm version

Installation

npm install --save mos-plugin-installation

Usage

Add 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: true specified in the package.json, the generated command will be npm install --global
  • If there is a preferDev: true specified in the package.json, the generated command will be npm 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.

API

installation(opts)

  • opts.useShortAlias - Boolean, false by default. If true, uses shorter aliases in the installation command. i instead of install, -S instead of --save, etc.

License

MIT © Zoltan Kochan

Package Sidebar

Install

npm i mos-plugin-installation

Weekly Downloads

38

Version

1.2.2

License

MIT

Last publish

Collaborators

  • zkochan