fix(core): update
This commit is contained in:
@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@pushrocks/smartntml',
|
||||
version: '1.0.4',
|
||||
version: '1.0.5',
|
||||
description: 'lit-html for the backend'
|
||||
}
|
||||
|
10
ts/index.ts
10
ts/index.ts
@ -10,6 +10,16 @@ export class Smartntml {
|
||||
return smartntml;
|
||||
}
|
||||
|
||||
private static smartntmlSingletonDeferred: plugins.smartpromise.Deferred<Smartntml>;
|
||||
public static async createAndInitSingleton() {
|
||||
if (this.smartntmlSingletonDeferred) {
|
||||
return this.smartntmlSingletonDeferred.promise;
|
||||
}
|
||||
const smartntmlInstance = await this.createAndInit();
|
||||
this.smartntmlSingletonDeferred.resolve(smartntmlInstance);
|
||||
return this.smartntmlSingletonDeferred.promise;
|
||||
}
|
||||
|
||||
// INSTANCE
|
||||
render: typeof litTypes.render;
|
||||
html: typeof litTypes.html;
|
||||
|
@ -1,2 +1,10 @@
|
||||
// happy-dom setup
|
||||
import { GlobalRegistrator } from '@happy-dom/global-registrator';
|
||||
GlobalRegistrator.register();
|
||||
|
||||
// @pushrocks scope
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
|
||||
export {
|
||||
smartpromise
|
||||
}
|
||||
|
Reference in New Issue
Block a user