Documentation v2.0.3

Getting Started

What RenderJS needs and the two ways to install it (npm or CDN).

Prerequisites

Installation

Install via npm

npm i @pardnchiu/renderjs

Include via CDN

<!-- Version 2.0.0 and above -->
<script src="https://cdn.jsdelivr.net/npm/@pardnchiu/renderjs@[VERSION]/dist/RenderJS.js" copyright="Pardn Ltd"></script>

<!-- Version 1.x (formerly PDRenderKit) -->
<script src="https://cdn.jsdelivr.net/npm/pdrenderkit@[VERSION]/dist/PDRenderKit.js"></script>

The RJS template engine requires copyright="Pardn Ltd": without it the script tag removes itself and never sets the init flag (document.$init), so RJS only processes text on the root node and leaves every child directive and {{ }} unrendered. Prototype extensions and chainable DOM construction work either way.

Next Steps

中文