npmextra/README.md

48 lines
2.4 KiB
Markdown
Raw Normal View History

2016-07-16 23:42:23 +00:00
# npmextra
2016-09-16 20:28:38 +00:00
do more with npm.
2016-07-16 23:42:23 +00:00
2016-07-16 23:54:57 +00:00
npmextra is a hub for a series of js tools that help writing, documenting and maintaining npm modules.
2016-07-18 22:36:19 +00:00
2016-09-16 20:28:38 +00:00
## Availabililty
2016-09-17 16:12:32 +00:00
[![npm](https://push.rocks/assets/repo-button-npm.svg)](https://www.npmjs.com/package/npmextra)
[![git](https://push.rocks/assets/repo-button-git.svg)](https://gitlab.com/pushrocks/npmextra)
[![git](https://push.rocks/assets/repo-button-mirror.svg)](https://github.com/pushrocks/npmextra)
[![docs](https://push.rocks/assets/repo-button-docs.svg)](https://pushrocks.gitlab.io/npmextra/)
2016-09-16 20:28:38 +00:00
## Status for master
2016-09-17 16:12:32 +00:00
[![build status](https://gitlab.com/pushrocks/npmextra/badges/master/build.svg)](https://gitlab.com/pushrocks/npmextra/commits/master)
[![coverage report](https://gitlab.com/pushrocks/npmextra/badges/master/coverage.svg)](https://gitlab.com/pushrocks/npmextra/commits/master)
[![Dependency Status](https://david-dm.org/pushrocks/npmextra.svg)](https://david-dm.org/pushrocks/npmextra)
[![bitHound Dependencies](https://www.bithound.io/github/pushrocks/npmextra/badges/dependencies.svg)](https://www.bithound.io/github/pushrocks/npmextra/master/dependencies/npm)
[![bitHound Code](https://www.bithound.io/github/pushrocks/npmextra/badges/code.svg)](https://www.bithound.io/github/pushrocks/npmextra)
2016-09-16 20:28:38 +00:00
[![TypeScript](https://img.shields.io/badge/TypeScript-2.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![node](https://img.shields.io/badge/node->=%206.x.x-blue.svg)](https://nodejs.org/dist/latest-v6.x/docs/api/)
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/)
2016-07-18 22:36:19 +00:00
## Usage
2016-09-18 14:09:27 +00:00
The main purpose of npmextra is to configure different tools using one npmextra.json. This way complex setups avoid additional complexity caused by too many configuration files.
2016-07-18 22:36:19 +00:00
2016-09-16 20:28:38 +00:00
npmextra.json
```json
{
"sometool": {
"defaultKey1": "awesomeValueFromConfig"
}
}
```
2016-07-18 22:36:19 +00:00
```typescript
2016-09-16 20:28:38 +00:00
import * as npmextra from 'npmextra'
2016-07-18 22:36:19 +00:00
npmextra.dataFor({
2016-09-16 20:28:38 +00:00
toolName:'sometool',
defaultSettings: { // gets merged with whatever is in the configfile
defaultKey1: 'defaultValue1', // so this will get overwritten with "awesomeValueFromConfig"
defaultKey2: 'defaultValue2' // this one will pass through unaltered
},
cwd?: string // lets you specifiy a custom current working directory to look for the npmextra.json
})
```
2016-07-18 22:36:19 +00:00
2016-09-16 20:28:38 +00:00
[![npm](https://push.rocks/assets/repo-header.svg)](https://push.rocks)