mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-21 09:38:01 +02:00
32 lines
771 B
TypeScript
32 lines
771 B
TypeScript
import Plugin from '../Plugin';
|
|
import Joplin from './Joplin';
|
|
|
|
/**
|
|
* @ignore
|
|
*/
|
|
// const builtinModules = require('builtin-modules');
|
|
|
|
/**
|
|
* @ignore
|
|
*/
|
|
export default class Global {
|
|
|
|
private joplin_: Joplin;
|
|
|
|
public constructor(implementation: any, plugin: Plugin, store: any) {
|
|
this.joplin_ = new Joplin(implementation, plugin, store);
|
|
}
|
|
|
|
public get joplin(): Joplin {
|
|
return this.joplin_;
|
|
}
|
|
|
|
// To get webpack to work with Node module we need to set the parameter `target: "node"`, however
|
|
// when setting this, the code generated by webpack will try to access the `process` global variable,
|
|
// which won't be defined in the sandbox. So here we simply forward the variable, which makes it all work.
|
|
public get process(): any {
|
|
return process;
|
|
}
|
|
|
|
}
|