interpret / 1.0.0 last updated 4 months ago created on Mar 20th 2014
Install
npm install --save interpret
Clone
git clone git@github.com:tkellen/node-interpret.git
dependencies
No dependencies listed.
maintainers
versions
28 total
| 1.0.0 | 4 months ago | phated |
| 0.6.6 | 6 months ago | tkellen |
| 0.6.5 | 8 months ago | tkellen |
| 0.6.4 | 8 months ago | tkellen |
| 0.6.3 | 9 months ago | phated |
| 0.6.2 | 10 months ago | tkellen |
| 0.6.1 | 10 months ago | tkellen |
| 0.6.0 | 10 months ago | tkellen |
| 0.5.2 | a year ago | phated |
| 0.5.1 | a year ago | tkellen |
| 0.5.0 | a year ago | tkellen |
| 0.4.3 | a year ago | tkellen |
| 0.4.2 | a year ago | tkellen |
| 0.4.1 | a year ago | tkellen |
| 0.4.0 | a year ago | tkellen |
| 0.3.10 | a year ago | tkellen |
| 0.3.9 | a year ago | tkellen |
| 0.3.8 | a year ago | tkellen |
| 0.3.7 | 2 years ago | tkellen |
| 0.3.6 | 2 years ago | tkellen |
| 0.3.5 | 2 years ago | tkellen |
| 0.3.4 | 2 years ago | tkellen |
| 0.3.3 | 2 years ago | tkellen |
| 0.3.2 | 2 years ago | tkellen |
| 0.3.1 | 2 years ago | tkellen |
| 0.3.0 | 2 years ago | tkellen |
| 0.2.0 | 2 years ago | tkellen |
| 0.1.0 | 2 years ago | tkellen |
readme
interpret
A dictionary of file extensions and associated module loaders.
What is it
This is used by Liftoff to automatically require dependencies for configuration files, and by rechoir for registering module loaders.
API
extensions
Map file types to modules which provide a require.extensions loader.
jsVariants
Same as above, but only include the extensions which are javascript variants.
How to use it
Consumers should use the exported extensions or jsVariants object to determine which module should be loaded for a given extension. If a matching extension is found, consumers should do the following:
If the value is null, do nothing.
If the value is a string, try to require it.
If the value is an object, try to require the
moduleproperty. If successful, theregisterproperty (a function) should be called with the module passed as the first argument.If the value is an array, iterate over it, attempting step #2 or #3 until one of the attempts does not throw.
