diff options
Diffstat (limited to 'node_modules/rechoir')
-rw-r--r-- | node_modules/rechoir/.npmignore | 1 | ||||
-rw-r--r-- | node_modules/rechoir/.travis.yml | 24 | ||||
-rw-r--r-- | node_modules/rechoir/CHANGELOG | 38 | ||||
-rw-r--r-- | node_modules/rechoir/LICENSE | 22 | ||||
-rw-r--r-- | node_modules/rechoir/README.md | 42 | ||||
-rw-r--r-- | node_modules/rechoir/index.js | 59 | ||||
-rw-r--r-- | node_modules/rechoir/lib/extension.js | 11 | ||||
-rw-r--r-- | node_modules/rechoir/lib/normalize.js | 15 | ||||
-rw-r--r-- | node_modules/rechoir/lib/register.js | 15 | ||||
-rw-r--r-- | node_modules/rechoir/package.json | 88 |
10 files changed, 0 insertions, 315 deletions
diff --git a/node_modules/rechoir/.npmignore b/node_modules/rechoir/.npmignore deleted file mode 100644 index 9daeafb98..000000000 --- a/node_modules/rechoir/.npmignore +++ /dev/null @@ -1 +0,0 @@ -test diff --git a/node_modules/rechoir/.travis.yml b/node_modules/rechoir/.travis.yml deleted file mode 100644 index 57e9fdabb..000000000 --- a/node_modules/rechoir/.travis.yml +++ /dev/null @@ -1,24 +0,0 @@ -sudo: false -language: node_js -node_js: - - "0.10" - - "0.12" -env: - global: - - REMOVE_DEPS="" - matrix: - - "CUSTOM_DEPS=coffee-script@~1.3" - - "CUSTOM_DEPS=coffee-script@~1.5" - - "CUSTOM_DEPS=coffee-script@~1.7" - - "CUSTOM_DEPS=coffee-script@latest" - - "CUSTOM_DEPS=iced-coffee-script@1.6.3-j" - - "CUSTOM_DEPS=iced-coffee-script@latest" - - "CUSTOM_DEPS=LiveScript@1.3.1 REMOVE_DEPS=livescript" - - "CUSTOM_DEPS=typescript-require REMOVE_DEPS=typescript-register" -matrix: - fast_finish: true -before_install: - - "npm install -g npm" # needs the newest version of npm -before_script: - - "[ \"${REMOVE_DEPS}\" == \"\" ] || npm rm $REMOVE_DEPS" - - "npm install $CUSTOM_DEPS" # install a specific version of dependencies diff --git a/node_modules/rechoir/CHANGELOG b/node_modules/rechoir/CHANGELOG deleted file mode 100644 index e10327b04..000000000 --- a/node_modules/rechoir/CHANGELOG +++ /dev/null @@ -1,38 +0,0 @@ -v0.6.2: - date: 2015-07-22 - changes: - - Return `undefined` when an unknown extension is provided to prepare and - the `nothrow` option is specified. -v0.6.1: - date: 2015-05-22 - changes: - - Add option for not throwing. -v0.6.0: - date: 2015-05-20 - changes: - - Include module name when prepare is successful. -v0.5.0: - date: 2015-05-20 - changes: - - Overhaul to support interpret 0.6.0. -v0.3.0: - date: 2015-01-10 - changes: - - Breaking: `load` method removed. - - Improved extension recognition. - - No longer fails upon dots in filenames. - - Support confuration objects. - - Support and test ES6. - - Support legacy module loading. -v0.2.2: - date: 2014-12-17 - changes: - - Expose interpret. -v0.2.0: - date: 2014-04-20 - changes: - - Simplify loading of coffee-script and iced-coffee-script. -v0.1.0: - date: 2014-04-20 - changes: - - Initial public release. diff --git a/node_modules/rechoir/LICENSE b/node_modules/rechoir/LICENSE deleted file mode 100644 index f467993c6..000000000 --- a/node_modules/rechoir/LICENSE +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2015 Tyler Kellen - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/node_modules/rechoir/README.md b/node_modules/rechoir/README.md deleted file mode 100644 index 32280c040..000000000 --- a/node_modules/rechoir/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# rechoir [](http://travis-ci.org/tkellen/js-rechoir) -> Require any supported file as a node module. - -[](https://nodei.co/npm/rechoir/) - -## What is it? -This 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]. - -## API - -### prepare(config, filepath, requireFrom) -Look 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). - -`config` An [interpret]-like configuration object. - -`filepath` A file whose type you'd like to register a module loader for. - -`requireFrom` An optional path to start searching for the module required to load the requested file. Defaults to the directory of `filepath`. - -If calling this method is successful (aka: it doesn't throw), you can now require files of the type you requested natively. - -An error with a `failures` property will be thrown if the module loader(s) configured for a given extension cannot be registered. - -If a loader is already registered, this will simply return `true`. - -**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. - -#### Usage -```js -const config = require('interpret').extensions; -const rechoir = require('rechoir'); -rechoir.prepare(config, './test/fixtures/test.coffee'); -rechoir.prepare(config, './test/fixtures/test.csv'); -rechoir.prepare(config, './test/fixtures/test.toml'); - -console.log(require('./test/fixtures/test.coffee')); -console.log(require('./test/fixtures/test.csv')); -console.log(require('./test/fixtures/test.toml')); -``` - -[interpret]: http://github.com/tkellen/js-interpret -[Liftoff]: http://github.com/tkellen/js-liftoff diff --git a/node_modules/rechoir/index.js b/node_modules/rechoir/index.js deleted file mode 100644 index 0c36d0586..000000000 --- a/node_modules/rechoir/index.js +++ /dev/null @@ -1,59 +0,0 @@ -const path = require('path'); - -const extension = require('./lib/extension'); -const normalize = require('./lib/normalize'); -const register = require('./lib/register'); - -exports.prepare = function (extensions, filepath, cwd, nothrow) { - var option, attempt; - var attempts = []; - var err; - var onlyErrors = false; - var ext = extension(filepath); - if (Object.keys(require.extensions).indexOf(ext) !== -1) { - return true; - } - var config = normalize(extensions[ext]); - if (!config) { - if (nothrow) { - return; - } else { - throw new Error('No module loader found for "'+ext+'".'); - } - } - if (!cwd) { - cwd = path.dirname(path.resolve(filepath)); - } - if (!Array.isArray(config)) { - config = [config]; - } - for (var i in config) { - option = config[i]; - attempt = register(cwd, option.module, option.register); - error = (attempt instanceof Error) ? attempt : null; - if (error) { - attempt = null; - } - attempts.push({ - moduleName: option.module, - module: attempt, - error: error - }); - if (!error) { - onlyErrors = false; - break; - } else { - onlyErrors = true; - } - } - if (onlyErrors) { - err = new Error('Unable to use specified module loaders for "'+ext+'".'); - err.failures = attempts; - if (nothrow) { - return err; - } else { - throw err; - } - } - return attempts; -}; diff --git a/node_modules/rechoir/lib/extension.js b/node_modules/rechoir/lib/extension.js deleted file mode 100644 index 60f19da4e..000000000 --- a/node_modules/rechoir/lib/extension.js +++ /dev/null @@ -1,11 +0,0 @@ -const path = require('path'); - -const EXTRE = /^[.]?[^.]+([.].*)$/; - -module.exports = function (input) { - var extension = EXTRE.exec(path.basename(input)); - if (!extension) { - return; - } - return extension[1]; -}; diff --git a/node_modules/rechoir/lib/normalize.js b/node_modules/rechoir/lib/normalize.js deleted file mode 100644 index 0da5e586f..000000000 --- a/node_modules/rechoir/lib/normalize.js +++ /dev/null @@ -1,15 +0,0 @@ -function normalizer (config) { - if (typeof config === 'string') { - return { - module: config - } - } - return config; -}; - -module.exports = function (config) { - if (Array.isArray(config)) { - return config.map(normalizer); - } - return normalizer(config); -}; diff --git a/node_modules/rechoir/lib/register.js b/node_modules/rechoir/lib/register.js deleted file mode 100644 index 20e8ca7dc..000000000 --- a/node_modules/rechoir/lib/register.js +++ /dev/null @@ -1,15 +0,0 @@ -const path = require('path'); -const resolve = require('resolve'); - -module.exports = function (cwd, moduleName, register) { - try { - var modulePath = resolve.sync(moduleName, {basedir: cwd}); - var result = require(modulePath); - if (typeof register === 'function') { - register(result); - } - } catch (e) { - result = e; - } - return result; -}; diff --git a/node_modules/rechoir/package.json b/node_modules/rechoir/package.json deleted file mode 100644 index 5629390a0..000000000 --- a/node_modules/rechoir/package.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "rechoir", - "description": "Require any supported file as a node module.", - "version": "0.6.2", - "homepage": "https://github.com/tkellen/node-rechoir", - "author": { - "name": "Tyler Kellen", - "url": "http://goingslowly.com/" - }, - "repository": { - "type": "git", - "url": "git://github.com/tkellen/node-rechoir.git" - }, - "bugs": { - "url": "https://github.com/tkellen/node-rechoir/issues" - }, - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/tkellen/node-rechoir/blob/master/LICENSE" - } - ], - "main": "index.js", - "engines": { - "node": ">= 0.10" - }, - "scripts": { - "test": "mocha -R spec test/index.js" - }, - "dependencies": { - "resolve": "^1.1.6" - }, - "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" - }, - "keywords": [ - "require", - "cjsx", - "co", - "coco", - "coffee-script", - "coffee", - "coffee.md", - "csv", - "earlgrey", - "es", - "es6", - "iced", - "iced.md", - "iced-coffee-script", - "ini", - "js", - "json", - "json5", - "jsx", - "react", - "litcoffee", - "liticed", - "ls", - "livescript", - "toml", - "ts", - "typescript", - "xml", - "yaml", - "yml" - ] -} |