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

dtplat-cli

v0.1.1

Published

The command line interface helper for generating components using the the-react-client structure.

Downloads

3

Readme

dtplat-cli

Build Status Standard - JavaScript Style Guide

dtplat-cli 用于 sedt 内部快速生成前后端模版代码



安装

首先切换 npm 的镜像

npm set config registry http://10.0.22.24:8081/nexus/repository/npm-group/
 npm install dtplat-cli

快速开始

 dtplat-cli --help

命令

dtplat-cli init

新建模版

dtplat-cli init my-project-name [options]
"-b, --boot", "获取boot版本的模版"
"-c, --cloud", "获取service-cloud版本的模版"
"--all", "同时包括sec与st"
"--sec", "配置为sec版本"
"--st", "配置为st版本"

crud 命令的使用

关于 crud 命令的使用共有 3 个子命令

-t, --template  获取配置文件样例
-d, --table     得到具体表结构
-u, --upload    发送配置文件到服务器并接收模板`

获取配置文件样例

dtplat-cli crud -t

输入此命令后,terminal 会显示配置文件的模板样例,用户可复制此样例到自己的 json 文件配置项目

关于配置文件模板:

db: 数据库信息
dtplatTable:需填写表的名称
moduleName: 默认请system
businessName: 功能名称英文
functionName: 功能名中文
dtplatColumns: 用户无需填写
dto:{
query:填写搜索框中的搜索字段
result: 用于表中的信息显示
edit: 可以编辑的字段
insert: 用户创建的字段
}

获取数据库表结构

dtplat-cli crud -d
  1. 用户首先需完成配置文件的数据库部分配置:

    • 例:
    "db":{
    "dbhost": "mysql57d02.db.ad01.sec.com",
    "dbport": "3306",
    "dbuser":"iam",
    "dbname": "iam",
    "dbpassword":"ABCD",
    "table":{
    "table_name": "iam_base_user"
    }
     "dtplatTable":{
     "tableName":"iam_base_user"
     },
  2. 用户和程序交互输入配置文件的路径 如:./test.json

  3. 程序接受参数后会将表信息输出显示

  4. 用户根据 显示的表信息 选择具体字段配置项目的增删改查操作( result 表示 table 在页面的展示内容,moduleName 暂定为 system) 注意: 比如配置 result,edit

    "result":[
      {
        "name": "mail_address",
        "comment":"邮寄地址",
        "htmlType":"input"
      }
    ],
    
         "edit":[
         {
        "name": "mail_address",
        "comment":"邮寄地址",
        "htmlType":"input"
        }
        ],
    

    备注:这里 所填内容 比如 "mail_address"这一字段 ,一定要存在于 crud -d的显示结果中

上传配置文件与模板下载

dtplat-cli crud -u
  1. 用户完成配置文件之后 使用此命令
  2. 通过交互再次输入配置文件路径
  3. 等待服务器生成模板并返回