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

@sailornpg/elpis

v1.0.0

Published

整个项目围绕基于dsl的渲染实现,以下为一个典型dsl渲染站点的模型配置

Readme

##一个企业级应用框架(全栈)

核心Model

整个项目围绕基于dsl的渲染实现,以下为一个典型dsl渲染站点的模型配置

{
  mode: "dashboard", // 模板类型,不同模板类型对应不同模板数据结构
  name: "", //名称
  desc: "", //描述
  icon: "",
  homePage: "", //首页(项目配置)
  // 头部菜单
  menu: [
    {
      key: "", // 菜单唯一标识
      name: "", // 菜单名称
      menuType: "", //枚举值, group | module
      // menuType == group 时可填
      subMenu: [
        {
          // 可递归 menuItem
        },
      ],
      // menuType == module 时可填
      moduleType: "", //枚举值,iframe | schema | custom | sider

      // 当moduleType == iframe
      iframeConfig: {
        path: "", // iframe地址
      },

      // 当moduleType == schema
      customConfig: {
        path: "", // 自定义路由路径
      },

      // 当moduleType == custom
      schemaConfig: {
        api: "", // 数据源API遵循restful
        schema: {
          //板块数据结构
          type: "object",
          properties: {
            key: {
              ...schema, // 标准schema配置
              label: "",
              type: "", //字段的中文名
              // table配置
              tableOptions: {
                ...elTableColumnConfig, //标准el-table-column配置
                visible: true, // 是否在表格中显示 默认true
              },
              // search-bar 相关配置
              searchOptions: {
                ...elComponentsConfig, // 标准el-component
                comType: "", // 配置组件类型
                default: "", //默认值

                // 如果comType == select
                enumList: [], // 枚举列表可选option

                // 如果comType == dynamicSelect
                api: "", // 动态获取枚举列表的接口
              },
              createFormOption: {
                // ...eleComponentConfig,
                comType: "",
                visible: true,
                disabled: false,
                default: "",
                // comType === 'select' 时生效
                enumList: [],
              },
            },
          },
        },
        tableConfig: {
          headerButtons: [
            {
              label: "", // 按钮名称
              eventKey: "", // 按钮事件key
              eventOption: {}, // 按钮具体配置
              //   ...elButtonConfig // 标准el-button配置
            },
          ],
          rowButtons: [
            {
              label: "", // 按钮名称
              eventKey: "", // 按钮事件key
              eventOption: {}, // 按钮具体配置
              //   ...elButtonConfig // 标准el-button配置
            },
          ],
        }, // 表格配置
        searchConfig: {}, // search-bar 相关配置
        components: {}, // 模块组件
      },

      // 当moduleType == sider
      siderConfig: {
        menu: [
          {
            // 可递归 menuItem(除moduleType == sider)
          },
        ],
      },
    },
  ],
}

服务端启动方法

const { serverStart } = require("@sailornpg/elpis");

const app = serverStart();

服务端配置

遵循约定式配置,文件结构如下:

app
├── config
│   ├── config.js
│   ├── config.dev.js
│   └── config.prod.js
├── controller
│   ├── demo.js
├── router
│   └── demo.js
├── extend
│   └── demo.js
├── router
│   └── demo.js
├── router-schema
│   └── demo.js
├── service
│   └── demo.js
└── webpack.config.js

前端构建

const { frontendBuild } = require("@sailornpg/elpis");

frontendBuild(process.env._ENV);

自定义页面拓展

app/pages/目录下写入口entry.xxx.js

dashboard / schema-view/ components 动态组件拓展

1、再 app/pages/dashboard/complex-view/schema-view/components 编写组件 2、配置到app/pages/dashboard/complex-view/schema-view/component-config.js

schema-form 组件拓展

1、再 app/widgets/schema-form/complex-view 编写组件 2、配置到app/widgets/schema-form/form-item-config.js

schema-search-bar 组件拓展

1、再 app/widgets/schema-search-bar/complex-view 编写组件 2、配置到app/widgets/schema-search-bar/form-item-config.js