raclette
v1.0.3
Published
Handle your rc files with ease
Downloads
30
Readme
raclette

Handle your rc files with ease.
Raclette is a resolver for JSON or javascript rc files of your Node.js libraries or applications.
Features
- JSON, javascript loaders
- Flowtype definitions
Installation
With NPM:
$ npm install raclette
With Yarn:
$ yarn add raclette
Usage
Raclette rc files resolution uses strategies and loaders which you need to provide as options.
import * as rc from 'raclette';
import type { ResolveResult } from 'raclette';
rc.resolve({
name: '.eslintrc',
strategies: [
rc.strategies.cwd,
rc.strategies.home,
],
loaders: [
rc.loaders.json,
],
}).then((result: ResolveResult) => {
console.log(result);
}).catch((err) => {
console.error(err);
});
Strategy
A strategy generate a set of paths where the resolver need to look for rc files.
rc.strategies.cwd
: Current working directoryrc.strageties.home
: Current user home directry
Loader
A loader try to load and parse rc files in a given location in the file system.
rc.loaders.json
: Load rc files in JSON formatrc.loaders.javascript
: Load rc files in javascript format
Licences
njakob/raclette
is licensed under the MIT License.