2016-07-17 01:42:23 +02:00
# npmextra
2016-09-16 22:28:38 +02:00
do more with npm.
2016-07-17 01:42:23 +02:00
2016-07-17 01:54:57 +02:00
npmextra is a hub for a series of js tools that help writing, documenting and maintaining npm modules.
2016-07-19 00:36:19 +02:00
2016-09-16 22:28:38 +02:00
## Availabililty
[](https://www.npmjs.com/package/npmpage)
[](https://gitlab.com/pushrocks/npmpage)
[](https://github.com/pushrocks/npmpage)
2016-09-16 22:29:12 +02:00
[](https://pushrocks.gitlab.io/npmpage/)
2016-09-16 22:28:38 +02:00
## Status for master
[](https://gitlab.com/pushrocks/npmpage/commits/master)
[](https://gitlab.com/pushrocks/npmpage/commits/master)
[](https://david-dm.org/pushrocks/npmpage)
[](https://www.bithound.io/github/pushrocks/npmpage/master/dependencies/npm)
[](https://www.bithound.io/github/pushrocks/npmpage)
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
[](http://standardjs.com/)
2016-07-19 00:36:19 +02:00
## Usage
The main purpose of npmextra is to configure different tools using one npmextra.json. This way complex setups avaoid complexity through many configuration files.
2016-09-16 22:28:38 +02:00
npmextra.json
```json
{
"sometool": {
"defaultKey1": "awesomeValueFromConfig"
}
}
```
2016-07-19 00:36:19 +02:00
```typescript
2016-09-16 22:28:38 +02:00
import * as npmextra from 'npmextra'
2016-07-19 00:36:19 +02:00
npmextra.dataFor({
2016-09-16 22:28:38 +02: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-19 00:36:19 +02:00
2016-09-16 22:28:38 +02:00
[](https://push.rocks)