docs(readme): use mos

This commit is contained in:
zkochan
2017-07-15 15:59:57 +03:00
parent 68a20903af
commit a2fcae004e
3 changed files with 1718 additions and 17 deletions

View File

@@ -1,16 +1,16 @@
# dependencies-hierarchy
[![Status](https://travis-ci.org/pnpm/dependencies-hierarchy.svg?branch=master)](https://travis-ci.org/pnpm/dependencies-hierarchy "See test builds")
> Creates a dependencies hierarchy for a symlinked \`node_modules\`
> Creates a dependencies hierarchy for a symlinked `node_modules`
<!--@shields('npm', 'travis')-->
[![npm version](https://img.shields.io/npm/v/dependencies-hierarchy.svg)](https://www.npmjs.com/package/dependencies-hierarchy) [![Build Status](https://img.shields.io/travis/pnpm/dependencies-hierarchy/master.svg)](https://travis-ci.org/pnpm/dependencies-hierarchy)
<!--/@-->
## Install
Install it via npm.
```
npm install dependencies-hierarchy
```
npm install dependencies-hierarchy
## API
@@ -20,10 +20,10 @@ Creates a dependency tree for a project's `node_modules`.
#### Arguments:
* `projectPath` - *String* - The path to the project.
* `[opts.depth]` - *Number* - 0 by default. How deep should the `node_modules` be analyzed.
* `[opts.only]` - *'dev' | 'prod'* - Optional. If set to `dev`, then only packages from `devDependencies` are analyzed.
If set to `prod`, then only packages from `dependencies` are analyzed.
- `projectPath` - _String_ - The path to the project.
- `[opts.depth]` - _Number_ - 0 by default. How deep should the `node_modules` be analyzed.
- `[opts.only]` - _'dev' | 'prod'_ - Optional. If set to `dev`, then only packages from `devDependencies` are analyzed.
If set to `prod`, then only packages from `dependencies` are analyzed.
### `forPackages(packageSelectors, projectPath, [opts]): Promise<Hierarchy>`
@@ -31,13 +31,13 @@ Creates a dependency tree for a project's `node_modules`. Limits the results to
#### Arguments:
* `packageSelectors` - *(string | {name: string, version: string})[]* - An array that consist of package names or package names and version ranges.
E.g. `['foo', {name: 'bar', version: '^2.0.0'}]`.
* `projectPath` - *String* - The path to the project
* `[opts.depth]` - *Number* - 0 by default. How deep should the `node_modules` be analyzed.
* `[opts.only]` - *'dev' | 'prod'* - Optional. If set to `dev`, then only packages from `devDependencies` are analyzed.
If set to `prod`, then only packages from `dependencies` are analyzed.
- `packageSelectors` - _(string | {name: string, version: string})\[]_ - An array that consist of package names or package names and version ranges.
E.g. `['foo', {name: 'bar', version: '^2.0.0'}]`.
- `projectPath` - _String_ - The path to the project
- `[opts.depth]` - _Number_ - 0 by default. How deep should the `node_modules` be analyzed.
- `[opts.only]` - _'dev' | 'prod'_ - Optional. If set to `dev`, then only packages from `devDependencies` are analyzed.
If set to `prod`, then only packages from `dependencies` are analyzed.
## License
[MIT](LICENSE)
[MIT](./LICENSE) © [Zoltan Kochan](https://www.kochan.io/)

View File

@@ -11,7 +11,8 @@
"prepare": "cd test && pnpm install",
"test": "cd test && npm test",
"prepublishOnly": "tsc",
"tsc": "tsc"
"tsc": "tsc",
"md": "tsc && mos"
},
"repository": {
"type": "git",
@@ -41,6 +42,16 @@
"semver": "^5.3.0"
},
"devDependencies": {
"mos": "^2.0.0-alpha.3",
"mos-plugin-readme": "^1.0.4",
"typescript": "^2.4.1"
},
"mos": {
"plugins": [
"readme"
],
"installation": {
"useShortAlias": true
}
}
}

View File

File diff suppressed because it is too large Load Diff