A mos plugin for creating installation section
npm i -S mos-plugin-installation
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 thepackage.json
, the generated command will benpm install --global
- If there is a
preferDev: true
specified 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.i
instead ofinstall
,-S
instead of--save
, etc.
- babel-runtime: babel selfContained runtime
- markdownscript: Creates markdown Abstract Syntax Tree
- mdast-util-to-string: Utility to get the plain text content of a node
- babel-cli: Babel command line.
- babel-plugin-add-module-exports: Fix babel/babel#2212
- babel-plugin-transform-runtime: Externalise references to helpers and builtins, automatically polyfilling your code without polluting globals
- babel-preset-es2015: Babel preset for all es2015 plugins.
- babel-register: babel require hook
- chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
- cz-conventional-changelog: Commitizen adapter following the conventional-changelog format.
- eslint: An AST-based pattern checker for JavaScript.
- eslint-config-standard: JavaScript Standard Style - ESLint Shareable Config
- eslint-plugin-promise: Enforce best practices for JavaScript promises
- eslint-plugin-standard: ESlint Plugin for the Standard Linter
- ghooks: Simple git hooks
- istanbul: Yet another JS code coverage tool that computes statement, line, function and branch coverage with module loader hooks to transparently add coverage when running tests. Supports all JS coverage use cases including unit tests, server side functional tests
- mocha: simple, flexible, fun test framework
- mos: A pluggable module that injects content into your markdown files via hidden JavaScript snippets
- mos-plugin-ejs: A mos plugin that executes embedded js in markdown files
- mos-processor: A markdown processor for mos
- semantic-release: automated semver compliant package publishing
- validate-commit-msg: Script to validate a commit message follows the conventional changelog standard