now adheres to standard js
This commit is contained in:
46
README.md
46
README.md
@@ -1,15 +1,47 @@
|
||||
# npmextra
|
||||
do more with npm
|
||||
do more with npm.
|
||||
|
||||
npmextra is a hub for a series of js tools that help writing, documenting and maintaining npm modules.
|
||||
|
||||
## Availabililty
|
||||
[](https://www.npmjs.com/package/npmpage)
|
||||
[](https://gitlab.com/pushrocks/npmpage)
|
||||
[](https://github.com/pushrocks/npmpage)
|
||||
[](https://pushrocks.gitlab.io/npmpage/gitbook)
|
||||
|
||||
## 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/)
|
||||
|
||||
## 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.
|
||||
|
||||
```typescript
|
||||
let npmextra = require("npmextra");
|
||||
npmextra.dataFor({
|
||||
toolName:"sometool",
|
||||
npmextra.json
|
||||
```json
|
||||
{
|
||||
"sometool": {
|
||||
"defaultKey1": "awesomeValueFromConfig"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
});
|
||||
```
|
||||
```typescript
|
||||
import * as npmextra from 'npmextra'
|
||||
|
||||
npmextra.dataFor({
|
||||
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
|
||||
})
|
||||
```
|
||||
|
||||
[](https://push.rocks)
|
||||
|
||||
Reference in New Issue
Block a user