zombiebox-extension-cutejs

1.2.1 • Public • Published

zombiebox-extension-cutejs

ZombieBox CuteJS template engine extension.

Usage

All compiled components may be accessed trough generated/cutejs/* import path. Also extension provides two additional namespaces:

  • cutejs-lib - CuteJS's client-library
  • cutejs - Contains abstract/base implementation of CuteJS's interfaces, includes: abstract-pupup, abstract-scene, inline-widget, abstract-widget

Example

app/widgets/container/container.jst

<div class="w-container" data-export-id="{{@container}}">Hello</div>

app/widgets/container/container.js

// Compiled template
import {render, Out} from 'generated/cutejs/<app>/widgets/container/container.jst';
// CuteJS's client-library
import {ComponentContainerInterface, ComponentInterface} from 'cutejs-lib/cute-library';
// Extension's library
import AbstractPopup from 'cutejs/layers/abstract-popup';
import AbstractScene from 'cutejs/layers/abstract-scene';
import InlineWidget from 'cutejs/widgets/inline-widget';
import AbstractWidget from 'cutejs/widgets/abstract-widget';
 
class Container extends AbstractWidget {
    constructor() {
        super();
        
        /**
         * @type {Out} 
         * @protected
         */
        this._exported;
    }
    
    /**
     * @override
     */
    _renderTemplate(){
        return render(this._getTemplateData(), this._getTemplateOptions());
    }
}

Package Sidebar

Install

npm i zombiebox-extension-cutejs

Weekly Downloads

4

Version

1.2.1

License

MIT

Unpacked Size

14.2 kB

Total Files

22

Last publish

Collaborators

  • reefridge
  • lacki
  • l1bbcsg