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

@ne_fe/page-cli

v1.0.3

Published

generate page by json

Downloads

4

Readme

简介

利用命令行与JSON配置,生成最简单的dashboard增删改查页面,具体业务需求还需进行具体修改。

安装&配置

$ npm i -g ne-page-cli

使用

先准备好json配置,放在哪里都可以

// {root}/devDep/data.json
{
  "search": {
    "type": "normal",
    "field": {
      "name": "姓名",
      "age": "年龄"
    }
  },
  "table": {
    "field": {
      "name": "姓名",
      "age": "年龄",
      "createTime": "创建时间"
    }
  },
  "modal": {
    "field": {
      "name": "姓名",
      "age": "年龄",
      "status": "状态"
    }
  }
}
  • search.type有两种值可选:
    • 1.normal:普通搜索表单,建议表单少的时候使用(一行可以排完的情况)
    • 2.form:Form搜索表单,建议表单多的时候使用(一行不能排完的情况)

执行命令行

ne-page -c ./devDep/data.json -p ./client/page/admin/HelloDashboard.vue

ne-page -h 可查看帮助

Options:

    -V, --version              output the version number
    -c, --config <configPath>  required, the path of the JSON configuration
    -p, --path <filePath>      The path(include name) of the file you want to generate
    -h, --help                 output usage information

注意事项

  • 1.config配置路径必须配置,且为标准的json格式,例子中的字段都必填。search和modal字段会生成Input组件,modal字段会默认加必填校验,table字段会生成key、title,按需修改即可。
  • 2.path文件路径可以不配,将会执行目录下生成在Unknown.vue
  • 3.期望在工程根目录下并且安装eslint后执行该命令,否则eslint修复文件则会失败