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 🙏

© 2026 – Pkg Stats / Ryan Hefner

wudong-cli

v1.1.2

Published

use for creating project template

Downloads

19

Readme

wudong-cli

项目描述

wudong-cli 是用于一键生成模板服务的脚手架。
目前支持:

  • Node Server
    这需要您在 wudongCli.config.json 中配置数据库的字段, 将支持一键生成 Node Server
    一键生成所配置的 sql 文件, 对于简单的库表结构可以做到开箱即用。

  • React Template
    目前尚不提供配置需求, React 模板

  • Cli
    目前尚不提供配置需求, 脚手架模板

  • Package
    目前尚不提供配置需求, npm包模板

  • Electron
    目前尚不提供配置需求, Electron + React + Typescript 模板

模板选项

安装

npm install wudong-cli -g

使用方式

初始化配置文件

wudong-cli init

获取选择的模板

wudong-cli generate

配置文件校验

wudong-cli check

生成 sql 命令

wudong-cli sql

完整版配置文件详解

{
  "database": {
    "name": "your database's name", // 数据库名称
    "username": "your database's username", // 数据库用户名
    "password": "your database's password", // 数据库密码
    "ip": "127.0.0.1", // 数据库IP,默认为本地

    "configuration": { // 数据库配置, 默认 mysql 目前不支持更改
      "engine": "InnoDB", // mysql的默认存储引擎
      
      // 请确保 mysql 版本为8.0+,以下两个字段才能生效
      "charset": "utf8mb4", // mysql的默认编码方式
      "collate": "utf8mb4_0900_ai_ci" // mysql 对于 utf8 的默认排序规则
    },

    "table": [{ // 数据库表, 可定义多个
      "name": "test", // 库表名称
      "needDefaultProps": true, // 是否需要默认的id、create_at属性, 默认是
      "columns": [ // 定义字段
        {
          "name": "age", // 字段名称
          "type": "INT", // 字段类型
          "notNull": true, // 字段是否不可为空
          "default": "" // 字段默认值
        },
        {
          "name": "name", // 字段名称
          "type": "VARCHAR(50)", // 字段类型
          "notNull": true, // 字段是否不可为空
          "default": "", // 字段默认值
        },
      ]
    }]
  },
}

数据字段类型支持

| 字段类型 | 描述 | | ---- | ---- | | INT | 对应 Mysql 中 INT 类型 | | TEXT | 对应 Mysql 中 TEXT 类型 | | DATE | 对应 Mysql 中 DATE 类型 | | DATETIME | 对应 Mysql 中 DATETIME 类型 | | VARCHAR | 对应 Mysql 中 VARCHAR() 类型 | | JSON | 对应 Mysql 中 JSON 类型 |

字段属性支持

| 字段属性 | 类型 | 描述 | | ---- | ---- | ---- | | primaryKey | Boolean | 对应 Mysql 中 PK | | autoIncrement | Boolean | 对应 Mysql 中 AI | | notNull | Boolean | 对应 Mysql 中 NN | | unique | Boolean | 对应 Mysql 中 UQ | | default | String | 对应 Mysql 中 Default/Expression |

已知问题

  • 目前支持的模板较少, 仅有 Node Server
  • 目前 Node Server 仅支持 Mysql 数据库
  • 目前在配置文件中检验的 Mysql 字段类型很有限, 后续会增加
  • 目前 Node Server 的库表信息填充方式为简单字符串填充,与 Server 模板耦合度较高