Skip to content

A dictionary of file extensions and associated module loaders.

License

Notifications You must be signed in to change notification settings

duereg/node-interpret

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

interpret

A dictionary of file extensions and associated module loaders.

NPM

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.

{
  '.cjsx': 'node-cjsx/register',
  '.co': 'coco',
  '.coffee': 'coffee-script/register',
  '.coffee.md': 'coffee-script/register',
  '.csv': 'require-csv',
  '.iced': 'iced-coffee-script/register',
  '.ini': 'require-ini',
  '.js': null,
  '.json': null,
  '.jsx': 'node-jsx',
  '.litcoffee': 'coffee-script/register',
  '.ls': 'livescript',
  '.toml': 'toml-require',
  '.ts': 'typescript-require',
  '.xml': 'require-xml',
  '.yaml': 'require-yaml',
  '.yml': 'require-yaml'
}

register

Check here to see if setup is needed for the module register itself with require.extensions. If a method is returned, call it with the module.

{
  'toml-require': function (module) {
    module.install();
  }
}

jsVariants

Extensions which are javascript variants.

{
  '.cjsx': 'node-cjsx/register',
  '.js': null,
  '.co': 'coco',
  '.coffee': 'coffee-script/register',
  '.coffee.md': 'coffee-script/register',
  '.iced': 'iced-coffee-script/register',
  '.jsx': 'node-jsx',
  '.litcoffee': 'coffee-script/register',
  '.ls': 'livescript',
  '.ts': 'typescript-require'
}

About

A dictionary of file extensions and associated module loaders.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%