mini-van-plate
Advanced tools
Comparing version 0.3.7 to 0.3.8
{ | ||
"name": "mini-van-plate", | ||
"version": "0.3.7", | ||
"version": "0.3.8", | ||
"description": "A minimalist template engine for DOM generation and manipulation, working for both client-side and server-side rendering", | ||
@@ -5,0 +5,0 @@ "files": [ |
# **Mini-Van**: A Minimalist Template Engine for Client/Server-side Rendering without JSX | ||
**Mini-Van** is an ***ultra-lightweight*** template engine for DOM composition and manipulation. With only 0.5kB in the minized bundle size, **Mini-Van** enables you to build comprehensive UI with elegant and expressive vanilla JavaScript code: | ||
**Mini-Van** is an ***ultra-lightweight*** template engine for DOM composition and manipulation. With only 0.4kB in the minified bundle size (0.3kB gzipped), **Mini-Van** enables you to build comprehensive UI with elegant and expressive vanilla JavaScript code: | ||
@@ -25,3 +25,3 @@ ```javascript | ||
**Mini-Van** is the slimmed-down version of [**VanJS**](https://vanjs.org), which aims to provide an ***ultra-lightweight***, ***zero-dependency***, and ***unopinionated*** Reactive UI framework based on pure vanilla JavaScript and DOM. Compared to **VanJS**, **Mini-Van** further reduces the bundle size to 0.5kB and can be used on the server-side as a [template engine](https://en.wikipedia.org/wiki/Web_template_system). | ||
**Mini-Van** is the slimmed-down version of [**VanJS**](https://vanjs.org), which aims to provide an ***ultra-lightweight***, ***zero-dependency***, and ***unopinionated*** Reactive UI framework based on pure vanilla JavaScript and DOM. Compared to **VanJS**, **Mini-Van** further reduces the gzipped minified bundle size to 0.3kB and can be used on the server-side as a [template engine](https://en.wikipedia.org/wiki/Web_template_system). | ||
@@ -152,3 +152,3 @@ ## Server-Side: Npm Integration | ||
import { serve } from "https://deno.land/std@0.184.0/http/server.ts" | ||
import van from "https://deno.land/x/minivan@0.3.7/src/van-plate.js" | ||
import van from "https://deno.land/x/minivan@0.3.8/src/van-plate.js" | ||
@@ -191,3 +191,3 @@ const {a, body, li, p, ul} = van.tags | ||
import { DOMParser } from "https://deno.land/x/deno_dom@v0.1.38/deno-dom-wasm.ts" | ||
import van from "https://deno.land/x/minivan@0.3.7/src/mini-van.js" | ||
import van from "https://deno.land/x/minivan@0.3.8/src/mini-van.js" | ||
@@ -227,14 +227,16 @@ const document = new DOMParser().parseFromString("", "text/html")! | ||
To get started on the client side, download the latest version [`mini-van-.min.js`](https://vanjs.org/autodownload?file=mini-van-.min.js) and add the line below to your script: | ||
To get started on the client side, add the line below to your script: | ||
```javascript | ||
import van from "./mini-van-.min.js" | ||
import van from "https://cdn.jsdelivr.net/gh/vanjs-org/mini-van/public/mini-van-0.3.8.min.js" | ||
``` | ||
To code without ES6 modules, you can download the bundled version [`mini-van-.nomodule.min.js`](https://vanjs.org/autodownload?file=mini-van-.nomodule.min.js) and add the following line to your HTML file instead: | ||
To code without ES6 modules, add the following line to your HTML file instead: | ||
```html | ||
<script type="text/javascript" src="mini-van-.nomodule.min.js"></script> | ||
<script type="text/javascript" src="https://cdn.jsdelivr.net/gh/vanjs-org/mini-van/public/mini-van-0.3.8.nomodule.min.js"></script> | ||
``` | ||
Alternative, you can download the files ([`mini-van-0.3.8.min.js`](https://vanjs.org/autodownload?file=mini-van-0.3.8.min.js), [`mini-van-0.3.8.nomodule.min.js`](https://vanjs.org/autodownload?file=mini-van-0.3.8.nomodule.min.js)) and serve them locally. | ||
You can find all relevant **Mini-Van** files in this [Download Table](https://vanjs.org/minivan#download-table). | ||
@@ -241,0 +243,0 @@ |
@@ -9,10 +9,5 @@ /// <reference types="./mini-van.d.ts" /> | ||
let vanWithDoc = doc => { | ||
let toDom = v => v.nodeType ? v : doc.createTextNode(v) | ||
let _result = { | ||
add: (dom, ...children) => { | ||
for (let child of children.flat(Infinity)) | ||
if (child != _undefined) dom.appendChild(toDom(child)) | ||
return dom | ||
}, | ||
add: (dom, ...children) => | ||
(dom.append(...children.flat(Infinity).filter(c => c != _undefined)), dom), | ||
@@ -19,0 +14,0 @@ tags: new Proxy((name, ...args) => { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
21404
251
217