mirror of
https://github.com/pulsar-edit/pulsar.git
synced 2024-10-27 03:32:44 +03:00
Removed unused _require method
This commit is contained in:
parent
d1314fc76c
commit
a456d9bf3e
@ -927,27 +927,6 @@ module.exports = class Package {
|
||||
}
|
||||
}
|
||||
|
||||
// a require function with both ES5 and ES6 default export support
|
||||
_require(path) {
|
||||
const modul = require(path);
|
||||
if (modul === null || modul === undefined) {
|
||||
// if null do not bother
|
||||
return modul;
|
||||
} else {
|
||||
if (
|
||||
modul.__esModule === true &&
|
||||
typeof modul.default === 'object' &&
|
||||
typeof modul.default.activate === 'function'
|
||||
) {
|
||||
// __esModule flag is true and the activate function exists inside it, which means
|
||||
// an object containing the main functions (e.g. activate, etc) is default exported
|
||||
return modul.default;
|
||||
} else {
|
||||
return modul;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getMainModulePath() {
|
||||
if (this.resolvedMainModulePath) return this.mainModulePath;
|
||||
this.resolvedMainModulePath = true;
|
||||
|
Loading…
Reference in New Issue
Block a user