Skip to content
This repository has been archived by the owner on Jan 25, 2020. It is now read-only.

Latest commit

 

History

History
33 lines (24 loc) · 731 Bytes

README.md

File metadata and controls

33 lines (24 loc) · 731 Bytes

file-resolver

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('file-resolver'),
    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