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

jianghu-init

v1.1.21

Published

Init jianghu app helper tools.

Downloads

55

Readme

Jianghu init

Jianghu init 是江湖 js的代码初始化工具。

安装 jianghu-init

# install
$ npm i -g jianghu-init
# upgrade
$ npm update -g jianghu-init

主要功能说明

  • jianghu-init project:创建项目,使用 type 指定不同类型的项目,支持独立应用、多应用项目
  • jianghu-init crud:在应用目录下执行,根据数据库已有表,生成并注册 crud 样例页面

示例一:创建一个独立应用项目

$ jianghu-init project --type=stand-alone my-jh-project
? project name my-jh-project
? project description My stand-alone jianghu project
...

根据输入配置好基本信息、数据库信息之后,便会自动初始化项目、数据库。

之后就可以进入项目目录进行后续操作。

$ cd my-jh-project
$ npm i
$ npm run dev

示例二:根据数据库已有表生成 CRUD 页面

# 生成 CRUD 页面
$ jianghu-init crud
✔ 初始化数据库连接成功
ℹ 开始生成 CRUD
? 请选择你要生成 crud 的表 (Press <space> to select, <a> to toggle all, <i> to invert selection)
❯◉ class
❯◯ student

选择你要生成 CRUD 的表即可。

示例三:创建一个多应用项目

# 创建一个多应用
$ jianghu-init project --type=multi my-jh-project
? project name my-jh-project
? project description My multi jianghu project
...

同样需要根据输入配置好基本信息、数据库信息,之后就可以进入项目目录对每个子应用进行操作。

$ cd my-jh-project
$ ls
data_repository  directory  simple_demo  ua_arm
$ cd simple_demo
$ npm i
$ npm run dev

示例四:在一个多应用下创建一个新应用

# 进入已有的多应用项目
$ cd my-jh-project
# 创建新应用
$ jianghu-init project --type=single biz-app
? project name biz-app
? project description Biz app
...

同样需要根据输入配置好基本信息、数据库信息即可创建一个新的子应用。

多应用项目说明

多应用项目,项目下的每个目录是一个应用,包括一些基础应用和自己的创建的业务应用,具体关联和概念可看江湖JS文档