add.[ALL]
This commit is contained in:
parent
5ac24c8cea
commit
780ad9a200
54 changed files with 3733 additions and 0 deletions
31
.resources/app/common/nodeGlobalPaths.js
Normal file
31
.resources/app/common/nodeGlobalPaths.js
Normal file
|
@ -0,0 +1,31 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.addGlobalPath = addGlobalPath;
|
||||
exports.getGlobalPaths = getGlobalPaths;
|
||||
exports.globalPathExists = globalPathExists;
|
||||
var _module = _interopRequireDefault(require("module"));
|
||||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
||||
const resolveLookupPaths = _module.default._resolveLookupPaths;
|
||||
_module.default._resolveLookupPaths = (request, parent) => {
|
||||
var _parent$paths;
|
||||
if (parent === null || parent === void 0 ? void 0 : (_parent$paths = parent.paths) === null || _parent$paths === void 0 ? void 0 : _parent$paths.length) {
|
||||
parent.paths = parent.paths.concat(_module.default.globalPaths);
|
||||
} else {
|
||||
parent.paths = _module.default.globalPaths;
|
||||
}
|
||||
return resolveLookupPaths(request, parent);
|
||||
};
|
||||
function getGlobalPaths() {
|
||||
return _module.default.globalPaths;
|
||||
}
|
||||
function addGlobalPath(path) {
|
||||
if (_module.default.globalPaths.indexOf(path) === -1) {
|
||||
_module.default.globalPaths.push(path);
|
||||
}
|
||||
}
|
||||
function globalPathExists(path) {
|
||||
return _module.default.globalPaths.indexOf(path) !== -1;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue