motion
Version:
motion - moving development forward
119 lines (118 loc) • 4.79 kB
JSON
{
"_args": [
[
"rechoir@https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"/Users/nw/flint/packages/flint"
]
],
"_from": "rechoir@>=0.6.0 <0.7.0",
"_id": "rechoir@0.6.2",
"_inCache": true,
"_location": "/rechoir",
"_phantomChildren": {},
"_requested": {
"name": "rechoir",
"raw": "rechoir@https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"rawSpec": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"scope": null,
"spec": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"type": "remote"
},
"_requiredBy": [
"/liftoff"
],
"_resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"_shasum": "85204b54dba82d5742e28c96756ef43af50e3384",
"_shrinkwrap": null,
"_spec": "rechoir@https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz",
"_where": "/Users/nw/flint/packages/flint",
"author": {
"name": "Tyler Kellen",
"url": "http://goingslowly.com/"
},
"bugs": {
"url": "https://github.com/tkellen/node-rechoir/issues"
},
"dependencies": {
"resolve": "^1.1.6"
},
"description": "Require any supported file as a node module.",
"devDependencies": {
"babel": "^5.4.3",
"chai": "^2.3.0",
"coco": "^0.9.1",
"coffee-script": "^1.9.2",
"earlgrey": "0.0.9",
"iced-coffee-script": "^1.8.0-d",
"interpret": "^0.6.1",
"json5": "^0.4.0",
"livescript": "^1.4.0",
"mocha": "^2.2.5",
"node-jsx": "^0.13.3",
"require-csv": "0.0.1",
"require-ini": "0.0.1",
"require-uncached": "^1.0.2",
"require-xml": "0.0.1",
"require-yaml": "0.0.1",
"rimraf": "^2.3.4",
"semver": "^4.3.4",
"sinon": "^1.14.1",
"toml-require": "^1.0.1",
"typescript-register": "^1.1.0"
},
"engines": {
"node": ">= 0.10"
},
"homepage": "https://github.com/tkellen/node-rechoir",
"keywords": [
"cjsx",
"co",
"coco",
"coffee",
"coffee-script",
"coffee.md",
"csv",
"earlgrey",
"es",
"es6",
"iced",
"iced-coffee-script",
"iced.md",
"ini",
"js",
"json",
"json5",
"jsx",
"litcoffee",
"liticed",
"livescript",
"ls",
"react",
"require",
"toml",
"ts",
"typescript",
"xml",
"yaml",
"yml"
],
"licenses": [
{
"type": "MIT",
"url": "https://github.com/tkellen/node-rechoir/blob/master/LICENSE"
}
],
"main": "index.js",
"name": "rechoir",
"optionalDependencies": {},
"readme": "# rechoir [](http://travis-ci.org/tkellen/js-rechoir)\n> Require any supported file as a node module.\n\n[](https://nodei.co/npm/rechoir/)\n\n## What is it?\nThis module, in conjunction with [interpret]-like objects can register any file type the npm ecosystem has a module loader for. This library is a dependency of [Liftoff].\n\n## API\n\n### prepare(config, filepath, requireFrom)\nLook for a module loader associated with the provided file and attempt require it. If necessary, run any setup required to inject it into [require.extensions](http://nodejs.org/api/globals.html#globals_require_extensions).\n\n`config` An [interpret]-like configuration object. \n\n`filepath` A file whose type you'd like to register a module loader for.\n\n`requireFrom` An optional path to start searching for the module required to load the requested file. Defaults to the directory of `filepath`.\n\nIf calling this method is successful (aka: it doesn't throw), you can now require files of the type you requested natively.\n\nAn error with a `failures` property will be thrown if the module loader(s) configured for a given extension cannot be registered.\n\nIf a loader is already registered, this will simply return `true`.\n\n**Note:** While rechoir will automatically load and register transpilers like `coffee-script`, you must provide a local installation. The transpilers are **not** bundled with this module.\n\n#### Usage\n```js\nconst config = require('interpret').extensions;\nconst rechoir = require('rechoir');\nrechoir.prepare(config, './test/fixtures/test.coffee');\nrechoir.prepare(config, './test/fixtures/test.csv');\nrechoir.prepare(config, './test/fixtures/test.toml');\n\nconsole.log(require('./test/fixtures/test.coffee'));\nconsole.log(require('./test/fixtures/test.csv'));\nconsole.log(require('./test/fixtures/test.toml'));\n```\n\n[interpret]: http://github.com/tkellen/js-interpret\n[Liftoff]: http://github.com/tkellen/js-liftoff\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git://github.com/tkellen/node-rechoir.git"
},
"scripts": {
"test": "mocha -R spec test/index.js"
},
"version": "0.6.2"
}