ribbit:独立的CLI可轻松进行静态文件生成和路由管理-源码

上传者: 42137723 | 上传时间: 2021-03-18 09:18:07 | 文件大小: 102KB | 文件类型: ZIP
什么是ribbitJS? Ribbit的目标是成为用于服务器端渲染的明智,可扩展的CLI工具。 只需进行一些配置即可为您的SPA生成内容丰富的标记(和内部CSS!)。 使用生成的路线清单文件为您的路线服务,您的用户将再也不会出现空白页! 通用渲染,解构 SPA的通用渲染可以分为6个阶段*: 路由:映射SPA中的路由。 序列化:从客户端导出渲染所需的状态/数据 执行:将捆绑JavaScript文件转换为标记。 使成为: 使用注入的字符串化应用程序包,脚本和插入任何其他模板数据来构造HTML文件的模板文字。 然后,编写HTML模板文字字符串以归档HTML静态资产。 回复 对于ribbit,响应将生成一个JSON清单文件,该文件将路由映射到在渲染阶段创建的静态资产。 反序列化和附加 确保当SPA将事件处理程序添加到页面时,其数据/存储与服务器响应发送的数据/状态混合在一起。 *感谢

文件下载

资源详情

[{"title":"( 37 个子文件 102KB ) ribbit:独立的CLI可轻松进行静态文件生成和路由管理-源码","children":[{"title":"ribbit-master","children":[{"title":"server","children":[{"title":"server.js <span style='color:#111;'> 2.32KB </span>","children":null,"spread":false},{"title":"middleware","children":[{"title":"serializeData.js <span style='color:#111;'> 604B </span>","children":null,"spread":false},{"title":"renderStaticFiles.js <span style='color:#111;'> 819B </span>","children":null,"spread":false},{"title":"executeStream.js <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false},{"title":"renderHTML.js <span style='color:#111;'> 1.46KB </span>","children":null,"spread":false}],"spread":true},{"title":"consts","children":[{"title":"globals.js <span style='color:#111;'> 1.45KB </span>","children":null,"spread":false}],"spread":true},{"title":"utils","children":[{"title":"index.js <span style='color:#111;'> 115B </span>","children":null,"spread":false}],"spread":true},{"title":"modules","children":[{"title":"rendering","children":[{"title":"writeStaticFiles.js <span style='color:#111;'> 1.08KB </span>","children":null,"spread":false},{"title":"sendFetches.js <span style='color:#111;'> 569B </span>","children":null,"spread":false},{"title":"index.js <span style='color:#111;'> 118B </span>","children":null,"spread":false}],"spread":true},{"title":"serializing","children":[{"title":"index.js <span style='color:#111;'> 791B </span>","children":null,"spread":false}],"spread":true},{"title":"routing","children":[{"title":"index.js <span style='color:#111;'> 708B </span>","children":null,"spread":false}],"spread":true},{"title":"execution","children":[{"title":"genWebpackConfig.js <span style='color:#111;'> 1.59KB </span>","children":null,"spread":false},{"title":"buildRoutesCliCommand.js <span style='color:#111;'> 755B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"bin","children":[{"title":"index.js <span style='color:#111;'> 1.07KB </span>","children":null,"spread":false}],"spread":true},{"title":".babelrc <span style='color:#111;'> 217B </span>","children":null,"spread":false},{"title":"package.json <span style='color:#111;'> 1.77KB </span>","children":null,"spread":false},{"title":".eslintrc.json <span style='color:#111;'> 328B </span>","children":null,"spread":false},{"title":".prettierrc <span style='color:#111;'> 46B </span>","children":null,"spread":false},{"title":"LICENSE <span style='color:#111;'> 1.04KB </span>","children":null,"spread":false},{"title":"package-lock.json <span style='color:#111;'> 317.41KB </span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'> 13B </span>","children":null,"spread":false},{"title":"lib","children":[{"title":"index.js <span style='color:#111;'> 285B </span>","children":null,"spread":false},{"title":"preloadActions.js <span style='color:#111;'> 355B </span>","children":null,"spread":false},{"title":"ribbitStore.js <span style='color:#111;'> 418B </span>","children":null,"spread":false},{"title":"getRibbitStore.js <span style='color:#111;'> 633B </span>","children":null,"spread":false},{"title":"ribbitPreload.js <span style='color:#111;'> 553B </span>","children":null,"spread":false},{"title":"cli","children":[{"title":"commands","children":[{"title":"build.js <span style='color:#111;'> 967B </span>","children":null,"spread":false},{"title":"init.js <span style='color:#111;'> 2.85KB </span>","children":null,"spread":false},{"title":"workspaces.js <span style='color:#111;'> 0B </span>","children":null,"spread":false},{"title":"dependencies.js <span style='color:#111;'> 0B </span>","children":null,"spread":false}],"spread":false},{"title":"prompts","children":[{"title":"prompts_init.js <span style='color:#111;'> 1.55KB </span>","children":null,"spread":false}],"spread":false},{"title":"utils","children":[{"title":"unlinkUserDeps.js <span style='color:#111;'> 355B </span>","children":null,"spread":false},{"title":"index.js <span style='color:#111;'> 214B </span>","children":null,"spread":false},{"title":"linkUserDeps.js <span style='color:#111;'> 418B </span>","children":null,"spread":false},{"title":"prettifyJS.js <span style='color:#111;'> 109B </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":true},{"title":"README.md <span style='color:#111;'> 4.74KB </span>","children":null,"spread":false}],"spread":false}],"spread":true}]

评论信息

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明