add docs
This commit is contained in:
parent
4184e8f20f
commit
15e3497c55
53
docs/index.md
Normal file
53
docs/index.md
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
# npmextra
|
||||||
|
do more with npm
|
||||||
|
|
||||||
|
## Availabililty
|
||||||
|
[](https://www.npmjs.com/package/npmextra)
|
||||||
|
[](https://GitLab.com/pushrocks/npmextra)
|
||||||
|
[](https://github.com/pushrocks/npmextra)
|
||||||
|
[](https://pushrocks.gitlab.io/npmextra/)
|
||||||
|
|
||||||
|
## Status for master
|
||||||
|
[](https://GitLab.com/pushrocks/npmextra/commits/master)
|
||||||
|
[](https://GitLab.com/pushrocks/npmextra/commits/master)
|
||||||
|
[](https://www.npmjs.com/package/npmextra)
|
||||||
|
[](https://david-dm.org/pushrocks/npmextra)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/npmextra/master/dependencies/npm)
|
||||||
|
[](https://www.bithound.io/github/pushrocks/npmextra)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](https://nodejs.org/dist/latest-v6.x/docs/api/)
|
||||||
|
[](http://standardjs.com/)
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
Use TypeScript for best in class instellisense.
|
||||||
|
|
||||||
|
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.
|
||||||
|
|
||||||
|
npmextra.json
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"sometool": {
|
||||||
|
"defaultKey1": "awesomeValueFromConfig"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```typescript
|
||||||
|
import { Npmextra } from 'npmextra'
|
||||||
|
|
||||||
|
let myNpmExtra = new Npmextra('my/path/to/cwd') // cwd argument is optional
|
||||||
|
mergedData = myNpmExtra.dataFor(
|
||||||
|
'sometool',
|
||||||
|
{ // 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
|
||||||
|
}
|
||||||
|
)
|
||||||
|
```
|
||||||
|
|
||||||
|
For further information read the linked docs at the top of this README.
|
||||||
|
|
||||||
|
> MIT licensed | **©** [Lossless GmbH](https://lossless.gmbh)
|
||||||
|
| By using this npm module you agree to our [privacy policy](https://lossless.gmbH/privacy.html)
|
||||||
|
|
||||||
|
[](https://push.rocks)
|
Loading…
x
Reference in New Issue
Block a user