npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

rake-jello

v0.1.2

Published

基于 fis3 针对 jsp/velocity 模板的前端工程解决方案。

Downloads

34

Readme

rake-jello

基于 fis3 针对 jsp/velocity 模板的前端工程解决方案。

使用说明

安装 rake-jello

npm install -g rake-jello

输入rkj -v 输出fis的标识,说明安装成功

编译产出

rkj release

启动调试服务。

rkj server start

获取rap mock数据

rkj data

rake-jello 开发流程

首先确保已经安装成功

进入工作目录,假设为 /workspace

所有的 rake-jello 项目都应该放在此根目录下

在当前目录运行 git clone [email protected]:java-web/jello-common.git

运行完成后,工作目录如下所示

workspace
    ├── jello-common 

jello-common 模块为 rake-jello 公共模块,提供了公共组件库,通用头尾,通过页面布局等功能,静态资源 combo 等也是通过模版继承来实现

注意 jello-common 目录名字不能修改

项目开发

开发老项目 (以 jello-zhongbao 为例)

在 workspace 目录下运行 git clone [email protected]:java-web/jello-zhongbao.git

运行完成后,工作目录如下所示

workspace
    ├── jello-common
    ├── jello-zhongbao         

rap 项目建立

前后端的接口文档,是存放在 rap 网站上的。接口是前后端沟通的桥梁,我们在完成需求分享和模块划分后,就需要和后端一起确定相关功能接口。

接口定好后,可以将接口录入到 rap 系统中。如果没有 RAP 账号,请联系程超

接口录入

请求URL填写,和PHP一样,只是接口描述的位置要把tpl的模板改为vm模板,如下:

  1. 请求类型 : get|post

  2. 请求url : /zhongbao/index 对应page目录下面的vm路径

  3. 接口描述 : { "render": "vm", "path": "zhongbao/index.vm" }

接口数据录入后,即可通过 rkj data 命令一键下载测试数据到本地。方便本地开发和调试

每次 RAP 系统接口有更新后,都需要运行 rkj data 获取最新的测试数据

使用rkj data后会新生成测试数据test(里面的数据和page下的模板是同名依赖关系)和路由文件server.conf,注意先在fis-config.js里面确定好rapId与namespace,rapId与RAP上建立的项目id保持一致,不然拉不下来数据。

RAP 使用说明

本地查看开发效果

在 rap 建立好接口后,或者更新接口后,都需要运行 rkj data 下载模拟数据

  1. 进入 jello-common 目录,运行 rkj release -cw,发布 jello-common 模块代码。jello-common为公共组件,通常情况不会发生变化,一般情况不需要加上监听参数w,直接使rk release -c就可以了。

  2. 进入 jello-zhongbao 目录,运行 rkj release -cw,发布 fis-zhongbao 模块代码

  3. 运行 rkj server start,打开本地测试环境地址,输入 fis-zhongbao 目录下的 server.conf 文件里相应的接口地址即可看到效果

查看更详细的命令介绍

发布后的代码在哪里?运行 rkj server open 即可看到本地的调试服务器目录

如果发生了调试运行的时候发现即使url变了,但渲染的内容依然是旧的,这就是缓存在作怪,可以rkj server open,手动删除缓存;也可以直接使用rkj server clean清空目录,然后重新发布一下。

velocity 模板语法

参考语法文档链接

和后端联调

doing