Skip to content
This repository was archived by the owner on Nov 3, 2019. It is now read-only.

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

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