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

@nemozhong0713/generator

v0.0.1

Published

- ✅ 构建初始页面文件,支持 next/rn/umi/weapp - ✅ 指定输出路径 - ✅ 增加 searchList 模板

Downloads

1

Readme

Features

  • ✅ 构建初始页面文件,支持 next/rn/umi/weapp
  • ✅ 指定输出路径
  • ✅ 增加 searchList 模板

Usage

  • Install(node -v >=15)
npm install @nemo/generator -g
yarn global add @nemo/generator
pnpm add -g @nemo/generator
  • Use

    生成初始页面

    • nemo g i --pageName --outputUrl(optional default='/src/pages')

    生成 searchList 页面

    • nemo g s --pageName --outputUrl(optional default='/src/pages')

    注意

    • 该工具只会创建一个 pageName 的文件夹,不会创建 outputUrl 的文件夹,请确保当前处于 outputUrl 可访问状态

nemo g i Home

nemo g i Home /cloud/src/pages

nemo g s template /private-project/shared/pages
  • 生成 CRUD 页面 step:
    1. nemo g s --pageName
    2. 输入配置文件的绝对路径
    3. _logic 文件的 AuthButton 后续集成
    4. 手动添加路由及菜单及权限

data.json 字段解释

  // 页面名称
  "objectName": String,
  // 页面中文名称
  "objectDisplayName": String,
  "parameters": [
    {
      // 单元项名称
      "name": String,
      // 单元项中文名称
      "displayName": String,
      // 后端存储的数据类型
      "type": String,
      // 存储的最大长度
      "length": Number,
      // 新增是否包含此项
      "canCreate": Boolean,
      // 编辑是否包含此项(没有用到该字段,一般不存在可以新增,但是编辑的时候不显示的情况,最多就是disabled,自行处理)
      "canEdit": Boolean,
      // 列表是否展示
      "canList": Boolean,
      // 详情是否展示(TODO: 因为目前无详情设计,暂未处理)
      "canDetail": Boolean,
      // 筛选是否包含此项
      "canQuery": Boolean,
      // 是否必填
      "required": Boolean,
      // 新增的默认值(没有用到该字段,因为新增和编辑默认值是不一样的,编辑需要从props里取,模板不做处理,自行处理)
      "defaultValue": any,
      // 数据源选项
      "options": null
                | {
                    "type": String,
                    "data": { "label": String, "value": String }[]
                    "src": null|String
                  }[],
      // 渲染的组件
      "editComponentType": String,
      // 正则校验
      "regexp": null|Regexp
    }
  ]