JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1097
  • Score
    100M100P100Q94480F
  • License Apache-2.0

Resolves to a file path given the source file, locale and file extension, used in kraken projects

Package Exports

  • file-resolver

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (file-resolver) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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