first commit

This commit is contained in:
armansansd
2023-07-12 16:31:19 +01:00
commit 3424b1927b
23306 changed files with 2217776 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
{
"node": true
}
+22
View File
@@ -0,0 +1,22 @@
Copyright (c) 2014 Sebastian McKenzie
MIT License
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.
+20
View File
@@ -0,0 +1,20 @@
# roadrunner
Roadrunner will cache require resolutions to heavily improve startup speed of
your node application.
## Installation
$ npm install roadrunner
## Usage
```javascript
var roadrunner = require("roadrunner");
roadrunner.load();
// your code here
roadrunner.save();
```
+54
View File
@@ -0,0 +1,54 @@
"use strict";
var Module = require("module");
var fs = require("fs");
var FILENAME = ".roadrunner.json";
var data = {};
var wrap = function (fn) {
return function (filename) {
filename = filename || FILENAME;
return fn(filename);
};
};
exports.save = wrap(function (filename) {
exports.set('realpath', Module._realpathCache);
exports.set('path', Module._pathCache);
fs.writeFileSync(filename, JSON.stringify(data, null, " "));
});
exports.load = wrap(function (filename) {
if (!fs.existsSync(filename)) return;
try {
data = JSON.parse(fs.readFileSync(filename));
} catch (err) {
return;
}
Module._pathCache = exports.get('path');
Module._realpathCache = exports.get('realpath');
});
exports.setup = function () {
process.on("exit", exports.save);
var sigint = function () {
process.removeListener("SIGINT", sigint);
exports.save();
process.kill(process.pid, "SIGINT");
};
process.on("SIGINT", sigint);
};
exports.get = function (key) {
return data[key] = data[key] || {};
};
exports.set = function (key, val) {
return data[key] = val;
};
+38
View File
@@ -0,0 +1,38 @@
{
"_from": "roadrunner@1.0.4",
"_id": "roadrunner@1.0.4",
"_inBundle": false,
"_integrity": "sha1-pp5dkssQZ+koGiECp23TcUC87S4=",
"_location": "/roadrunner",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "roadrunner@1.0.4",
"name": "roadrunner",
"escapedName": "roadrunner",
"rawSpec": "1.0.4",
"saveSpec": null,
"fetchSpec": "1.0.4"
},
"_requiredBy": [
"/6to5-core"
],
"_resolved": "https://registry.npmjs.org/roadrunner/-/roadrunner-1.0.4.tgz",
"_shasum": "a69e5d92cb1067e9281a2102a76dd37140bced2e",
"_spec": "roadrunner@1.0.4",
"_where": "/srv/http/mmap_sarrebourg/user/themes/basic/node_modules/6to5-core",
"bugs": {
"url": "https://github.com/sebmck/roadrunner/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Cache require resolutions to heavily improve startup speed on subsequent loads",
"homepage": "https://github.com/sebmck/roadrunner#readme",
"name": "roadrunner",
"repository": {
"type": "git",
"url": "git+https://github.com/sebmck/roadrunner.git"
},
"version": "1.0.4"
}