mirror of
https://github.com/snachodog/just-the-docs.git
synced 2025-09-12 21:03:32 -06:00
Initial commit
This commit is contained in:
30
node_modules/require-from-string/index.js
generated
vendored
Normal file
30
node_modules/require-from-string/index.js
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
'use strict';
|
||||
|
||||
var Module = require('module');
|
||||
var path = require('path');
|
||||
|
||||
module.exports = function requireFromString(code, filename, opts) {
|
||||
if (typeof filename === 'object') {
|
||||
opts = filename;
|
||||
filename = undefined;
|
||||
}
|
||||
|
||||
opts = opts || {};
|
||||
filename = filename || '';
|
||||
|
||||
opts.appendPaths = opts.appendPaths || [];
|
||||
opts.prependPaths = opts.prependPaths || [];
|
||||
|
||||
if (typeof code !== 'string') {
|
||||
throw new Error('code must be a string, not ' + typeof code);
|
||||
}
|
||||
|
||||
var paths = Module._nodeModulePaths(path.dirname(filename));
|
||||
|
||||
var m = new Module(filename, module.parent);
|
||||
m.filename = filename;
|
||||
m.paths = [].concat(opts.prependPaths).concat(paths).concat(opts.appendPaths);
|
||||
m._compile(code, filename);
|
||||
|
||||
return m.exports;
|
||||
};
|
21
node_modules/require-from-string/license
generated
vendored
Normal file
21
node_modules/require-from-string/license
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Vsevolod Strukchinsky <floatdrop@gmail.com> (github.com/floatdrop)
|
||||
|
||||
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.
|
85
node_modules/require-from-string/package.json
generated
vendored
Normal file
85
node_modules/require-from-string/package.json
generated
vendored
Normal file
@@ -0,0 +1,85 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"require-from-string@^1.1.0",
|
||||
"/Users/pmarsceill/_projects/just-the-docs/node_modules/cosmiconfig"
|
||||
]
|
||||
],
|
||||
"_from": "require-from-string@>=1.1.0 <2.0.0",
|
||||
"_id": "require-from-string@1.2.1",
|
||||
"_inCache": true,
|
||||
"_installable": true,
|
||||
"_location": "/require-from-string",
|
||||
"_nodeVersion": "6.6.0",
|
||||
"_npmOperationalInternal": {
|
||||
"host": "packages-12-west.internal.npmjs.com",
|
||||
"tmp": "tmp/require-from-string-1.2.1.tgz_1475350323439_0.3740670408587903"
|
||||
},
|
||||
"_npmUser": {
|
||||
"email": "floatdrop@gmail.com",
|
||||
"name": "floatdrop"
|
||||
},
|
||||
"_npmVersion": "3.10.3",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"name": "require-from-string",
|
||||
"raw": "require-from-string@^1.1.0",
|
||||
"rawSpec": "^1.1.0",
|
||||
"scope": null,
|
||||
"spec": ">=1.1.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/cosmiconfig"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz",
|
||||
"_shasum": "529c9ccef27380adfec9a2f965b649bbee636418",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "require-from-string@^1.1.0",
|
||||
"_where": "/Users/pmarsceill/_projects/just-the-docs/node_modules/cosmiconfig",
|
||||
"author": {
|
||||
"email": "floatdrop@gmail.com",
|
||||
"name": "Vsevolod Strukchinsky",
|
||||
"url": "github.com/floatdrop"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/floatdrop/require-from-string/issues"
|
||||
},
|
||||
"dependencies": {},
|
||||
"description": "Require module from string",
|
||||
"devDependencies": {
|
||||
"mocha": "*"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "529c9ccef27380adfec9a2f965b649bbee636418",
|
||||
"tarball": "https://registry.npmjs.org/require-from-string/-/require-from-string-1.2.1.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "b81e995c6ff82fbf71d9ee7a9990b10794fecb98",
|
||||
"homepage": "https://github.com/floatdrop/require-from-string#readme",
|
||||
"keywords": [],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "floatdrop",
|
||||
"email": "floatdrop@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "require-from-string",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/floatdrop/require-from-string.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"version": "1.2.1"
|
||||
}
|
56
node_modules/require-from-string/readme.md
generated
vendored
Normal file
56
node_modules/require-from-string/readme.md
generated
vendored
Normal file
@@ -0,0 +1,56 @@
|
||||
# require-from-string [](https://travis-ci.org/floatdrop/require-from-string)
|
||||
|
||||
Load module from string in Node.
|
||||
|
||||
## Install
|
||||
|
||||
```
|
||||
$ npm install --save require-from-string
|
||||
```
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var requireFromString = require('require-from-string');
|
||||
|
||||
requireFromString('module.exports = 1');
|
||||
//=> 1
|
||||
```
|
||||
|
||||
|
||||
## API
|
||||
|
||||
### requireFromString(code, [filename], [options])
|
||||
|
||||
#### code
|
||||
|
||||
*Required*
|
||||
Type: `string`
|
||||
|
||||
Module code.
|
||||
|
||||
#### filename
|
||||
Type: `string`
|
||||
Default: `''`
|
||||
|
||||
Optional filename.
|
||||
|
||||
|
||||
#### options
|
||||
Type: `object`
|
||||
|
||||
##### appendPaths
|
||||
Type: `Array`
|
||||
|
||||
List of `paths`, that will be appended to module `paths`. Useful, when you want
|
||||
to be able require modules from these paths.
|
||||
|
||||
##### prependPaths
|
||||
Type: `Array`
|
||||
|
||||
Same as `appendPath`, but paths will be prepended.
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Vsevolod Strukchinsky](http://github.com/floatdrop)
|
Reference in New Issue
Block a user