Skip to content

installation

Kingcean edited this page May 16, 2020 · 2 revisions

You can install this web front-end library by npm or by downloading the bundled file to insert a script tag into your web page directly.

ES6 / Type Script via npm

npm i hje

Then you can import the ones you needed by patching. Following is a sample.

import * as Hje from 'hje';

let ele = document.createElement("div");
document.body.appendChild(ele);

Hje.render(ele, {
    children: "Hello world!"
});

CommonJS via npm

npm i hje

And you can require the library and patch what you needed. Following is a sample.

const Hje = require('hje');

let ele = document.createElement("div");
document.body.appendChild(ele);

Hje.render(ele, {
    children: "Hello world!"
});

Insert script file

You can download the bundle file and insert it into your web page, then you can use the global namespace Hje. Following is a sample.

let ele = document.createElement("div");
document.body.appendChild(ele);

Hje.render(ele, {
    children: "Hello world!"
});

Next

Clone this wiki locally