【文件属性】:
文件名称:以前的:用于客户端应用程序的微型预渲染器
文件大小:16KB
文件格式:ZIP
更新时间:2021-01-31 05:58:14
static-site-generator chrome optimization prerender static-site
蚂蚁
轻松预渲染静态网站。
Antedate是一个简单的API和CLI,它使用Chrome Pupeteer来预渲染客户端网站。 它会自动启动本地服务器并渲染提供的每个路由。
安装
$ npm install antedate
用法
您可以使用或 。
$ antedate render -r /home -r /about
import antedate from 'antedate'
const routes = [ '/' , '/about' , '/contact' ] ;
const site = './site' ;
await antedate ( site , routes ) ;
// => [
// { html: '....', route: '/', path: '/index.html' },
// { html: '....', route: '/about', path: '/about.html' }
// ...
// ]
await antedate ( site , routes , { headless : fa
【文件预览】:
antedate-master
----.travis.yml(33B)
----package.json(830B)
----readme.md(3KB)
----.github()
--------workflows()
----test()
--------index.js(1KB)
--------site()
----license(1KB)
----package-lock.json(27KB)
----src()
--------index.js(2KB)
--------bin.js(1KB)
--------util()
----.gitignore(27B)
----.editorconfig(212B)