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

ncbuild

v0.2.2

Published

nc builder

Downloads

4

Readme

ncbuild

nc builder

本项目为内部使用,实现快速创建模板,列表按钮,卡片按钮。

依赖环境

  • node 6.0及以上
  • npm

安装

$ npm install -g ncbuild

基本命令

$ ncbuild temp [option]  创建基础模板文件夹
$ ncbuild card [option]  创建卡片按钮模板
$ ncbuild list [option]  创建列表按钮模板

使用第一步

进入项目目录

$ cd project

创建模板

$ ncbuild temp --module=ModuleName --comp=CompName --name=DirectoryName --data=MetaData --type=TypeName --node=NodeName --tab=SubTableName

因模板参数较多,为简化,推荐使用以下方式:将参数写入json文件,仅仅传file参数即可创建模板.

$ ncbuild temp --file ./config.json

pmreport为例:

$ touch config.json
$ vi config.json

# config.json写入以下内容
{
  "name": "pmreport",
  "data": "pmreport",
  "module": "party",
  "comp": "dwmgr",
  "type": "PT42",
  "node": "PTH10402",
  "tab": "子表名称(如无子表设置为空)"
}

#创建模板
$ ncbuild temp --file ./config.json

P.S:以上路径可以为相对或绝对路径

创建列表按钮

支持创建body,list按钮

$ ncbuild list --name ComponentName --body[head] ButtonName

以党群关系relation为例:

# 党群关系:列表页面创建名为leave的body按钮
$ ncbuild list --name relation --body leave
# 输出:relationListBodyLeaveAction.js

# 党群关系:列表页创建名为commit的头部按钮
$ ncbuild list --name relation --head commit
# 输出: relationListHeadCommitAction.js

创建卡片按钮

支持创建body,list按钮

$ ncbuild card --name ComponentName --body[head] ButtonName

以党群关系relation为例:

# 党群关系:卡片页面创建名为publish的body按钮
$ ncbuild card --name relation --body publish
# 输出:relationCardBodyPublishAction.js

# 党群关系:列表页创建名为edit的头部按钮
$ ncbuild card --name relation --head edit
# 输出: relationCardHeadEditAction.js

模板说明

  • 创建模板中,部分需要重写的部分已经做了提示

TODO

  • file形式创建模板暂不支持大小写,需要优化✅
  • 支持指定路径输出❌
  • 输出提示✅
  • 支持模板,卡片,列表多命令✅

备注

  • 使用了jc/lsqkmgr下的lsqkreport模板:

    • 修正fullclassname统一为此类写法nc.vo.jc.lsqk.AggLsqk

    • 去除了私有方法

    • 模板包含子表,创建生成后,需要根据实际情况自行注释

    • 所有参数均按照变量替换

    • html中的jcform类名保留不做批量更改