Git Product home page Git Product logo

zombiebox-extension-cutejs's Introduction

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());
	}
}

zombiebox-extension-cutejs's People

Contributors

l1bbcsg avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

zombiebox-extension-cutejs's Issues

ENOENT: no such file or directory, open

I managed to get the following packages installed

{
  "name": "zb-demo-project",
  "version": "1.0.0",
  "scripts": {
    "start": "zombiebox run",
    "build": "zombiebox build all"
  },
  "dependencies": {
    "zb-utils": "^0.1.8",
    "zombiebox": "^2.0.0",
    "zombiebox-extension-cutejs": "^1.2.0",
    "zombiebox-extension-dependency-injection": "2.0.0",
    "zombiebox-extension-ui": "^2.0.0",
    "zombiebox-platform-android-tv": "^3.0.0",
    "zombiebox-platform-pc": "^2.0.0"
  }
}

when I run to npm start

I get the following

$ zombiebox run
Extension cutejs loaded
Extension dependency-injection loaded
Extension ui loaded
Platform android loaded
Platform pc loaded

Replace Autoprefixer browsers option to Browserslist config.
Use browserslist key in package.json or .browserslistrc file.

Using browsers option cause some error. Browserslist config
can be used for Babel, Autoprefixer, postcss-normalize and other tools.

If you really need to use option, rename it to overrideBrowserslist.

Learn more at:
https://github.com/browserslist/browserslist#readme
https://twitter.com/browserslist

Open http://localhost:1337/

However when I visit the browser I get...

ENOENT: no such file or directory, open '/usr/src/.generated/cutejs/demo/scenes/abstract-base/abstract-base.jst.js'
Referrer: modules/demo/scenes/abstract-base/abstract-base
ENOENT: no such file or directory, open '/usr/src/.generated/cutejs/demo/scenes/custom-input/custom-input.jst.js'
Referrer: modules/demo/scenes/custom-input/custom-input
.....

On checking the .generated folder it appears that the files were not generated as planned.

I'm assuming that the extension is not compatible with the new changes?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.