{"name":"rechoir","version":"1.0.0","keywords":["require","loader","extension","extensions","prepare"],"author":{"url":"http://gulpjs.com/","name":"Gulp Team","email":"team@gulpjs.com"},"license":"MIT","_id":"rechoir@1.0.0","maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"}],"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"},{"url":"http://goingslowly.com/","name":"Tyler Kellen","email":"tyler@sleekcode.net"}],"homepage":"https://github.com/gulpjs/rechoir#readme","bugs":{"url":"https://github.com/gulpjs/rechoir/issues"},"nyc":{"reporter":["lcov","text-summary"]},"dist":{"shasum":"7302d3ef55a2aae97b0de22ae61147002780870e","tarball":"http://registry-npm.ywwl.com/rechoir/download/rechoir-1.0.0.tgz","fileCount":7,"integrity":"sha512-vyBa7bWz11iJRwzJR0nGLt6r45bymWfYXAgd1FmP08BNP/DHAVabgpGPyEXQmBtKvhgxi17SQz2szhvkberQsg==","signatures":[{"sig":"MEUCICMCOidihePLDP4xHHYmG1JN6D6f6GZ0Tk6Oe3AIdWEEAiEA1wvjTr8+tgf9jn9/dQ6IOHqOgGtWBM/8iqcLsABz2po=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCID0hU8e4qWzhZzs+1G/DowS8LTl2Ogv+lh1HIC6aP01fAiAg0Vg1+ZQkOLGw5WVtwN4smWHxnF6jD1eMd9x/QcM+ig==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":8707,"size":3792,"noattachment":false,"key":"/rechoir/-/rechoir-1.0.0.tgz"},"main":"./index.js","engines":{"node":">= 22.15.0"},"funding":"https://github.com/sponsors/gulpjs","gitHead":"b044b67f8e69aacfb126d53a23c6772d13e86ad3","scripts":{"lint":"eslint .","test":"nyc mocha --async-only","pretest":"rm -rf tmp/ && npm run lint","format-check":"prettier . --check","format-write":"prettier . --write"},"_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"repository":{"url":"git+https://github.com/gulpjs/rechoir.git","type":"git"},"_npmVersion":"10.9.2","description":"Prepare a node environment to require files with different extensions.","directories":{},"_nodeVersion":"22.16.0","dependencies":{},"_hasShrinkwrap":false,"devDependencies":{"nyc":"^15.1.0","mocha":"^8.3.0","eslint":"10.11.0","expect":"^27.0.0","prettier":"3.9.6","eslint-config-gulp":"7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/rechoir_1.0.0_1791926583054_0.13983411270609536","host":"s3://npm-registry-packages-npm-production"},"readme":"<p align=\"center\">\n  <a href=\"https://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\n\n# rechoir\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nPrepare a node environment to require files with different extensions.\n\n## What is it?\n\nThis module, in conjunction with [interpret]-like objects, can register any filetype the npm ecosystem has a module loader for. This library is a dependency of [liftoff].\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\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## API\n\n### `prepare(config, filepath, [cwd], [noThrow])`\n\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].\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`cwd` An optional path to start searching for the module required to load the requested file. Defaults to the directory of `filepath`.\n\n`noThrow` An optional boolean indicating if the method should avoid throwing.\n\nIf calling this method is successful (e.g. 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## Strict No LLM / No AI Policy\n\nNo LLMs for issues.\n\nNo LLMs for patches / pull requests.\n\nNo LLMs for comments on the bug tracker, including translation.\n\nEnglish is encouraged, but not required. You are welcome to post in your native language and rely on others to have their own translation tools of choice to interpret your words.\n\n## License\n\nMIT\n\n<!-- prettier-ignore-start -->\n[downloads-image]: https://img.shields.io/npm/dm/rechoir.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/rechoir\n[npm-image]: https://img.shields.io/npm/v/rechoir.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/rechoir/actions/workflows/dev.yml\n[ci-image]: https://img.shields.io/github/actions/workflow/status/gulpjs/rechoir/dev.yml?style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/rechoir\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/rechoir/main.svg?style=flat-square\n<!-- prettier-ignore-end -->\n\n<!-- prettier-ignore-start -->\n[interpret]: https://github.com/gulpjs/interpret\n[require.extensions]: https://nodejs.org/api/modules.html#modules_require_extensions\n[liftoff]: https://github.com/js-cli/js-liftoff\n<!-- prettier-ignore-end -->\n","publish_time":1791926583146,"_cnpm_publish_time":1791926583146,"dist-tags":{"latest":"1.0.0"}}