Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

file-resolver

2.0.0-3 • Public • Published

file-resolver

Lead Maintainer: Aria Stewart

Build Status

Used in kraken based projects for resolving file paths when given the locale, source file name, and the file extension.

Simple Usage:

var fr = require('fileResolver'),
    resolver = fr.create({root: 'path/to/templates', fallback: 'en_US', ext: 'dust'}),
    fileInfo = resolver.resolve('foo', 'es_ES');
 
//fileInfo = {
//  root: 'path/to/templates/ES/es',
//  file: 'path/to/templates/ES/es/foo.dust',
//  ext: 'dust',
//  name: 'foo'
//}

Running Tests:

To Run tests
$npm test

To Run Coverage
$npm run-script cover

To Run linting
$npm run-script lint

Keywords

none

install

npm i file-resolver

Downloadsweekly downloads

620

version

2.0.0-3

license

Apache-2.0

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability