mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 08:18:50 +00:00
My big initial commit to this repo and project.
This commit is contained in:
parent
750811a81f
commit
8636f8cf9b
2433 changed files with 199488 additions and 1042 deletions
41
node_modules/meteor-node-stubs/index.js
generated
vendored
Normal file
41
node_modules/meteor-node-stubs/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
var map = require("./map.json");
|
||||
var meteorAliases = {};
|
||||
|
||||
Object.keys(map).forEach(function (id) {
|
||||
if (typeof map[id] === "string") {
|
||||
var aliasParts = module.id.split("/");
|
||||
aliasParts.pop();
|
||||
aliasParts.push("node_modules", map[id]);
|
||||
exports[id] = meteorAliases[id + ".js"] =
|
||||
aliasParts.join("/");
|
||||
} else {
|
||||
exports[id] = map[id];
|
||||
meteorAliases[id + ".js"] = function(){};
|
||||
}
|
||||
});
|
||||
|
||||
if (typeof meteorInstall === "function") {
|
||||
meteorInstall({
|
||||
// Install the aliases into a node_modules directory one level up from
|
||||
// the root directory, so that they do not clutter the namespace
|
||||
// available to apps and packages.
|
||||
"..": {
|
||||
node_modules: meteorAliases
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// If Buffer is not defined globally, but the "buffer" built-in stub is
|
||||
// installed and can be imported, use it to define global.Buffer so that
|
||||
// modules like core-util-is/lib/util.js can refer to Buffer without
|
||||
// crashing application startup.
|
||||
if (typeof global.Buffer !== "function") {
|
||||
try {
|
||||
// Use (0, require)(...) to avoid registering a dependency on the
|
||||
// "buffer" stub, in case it is not otherwise bundled.
|
||||
global.Buffer = (0, require)("buffer").Buffer;
|
||||
} catch (ok) {
|
||||
// Failure to import "buffer" is fine as long as the Buffer global
|
||||
// variable is not used.
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue