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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@yinian-lq/elpis

v1.0.1

Published

企业级全栈应用框架

Readme

elpis

一个企业级全栈应用框架

model配置( JSON Shema)

{
    model: 'Dashboard',//模版类型,不同模版类型对应不一样的模版数据结构
    name: "",//模版名称
    desc: "",//模版描述
    icon: "",//模版图标
    homePage: "",//首页路径(项目配置)
    //头部菜单
    menu: [{
        key: '',//菜单key,唯一标识
        name: '',//菜单名称
        menuType: '',//菜单类型,枚举值,group / module

        // 当menuType == group 可填
        subMenu: [{
            //可递归menuItem
        }, ...]

        // 当 menuType == module 可填
        moduleType: '',//模块类型,枚举值: sider / iframe / custom/ schema

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

        // 当 moduleType == iframe 时
        iframeConfig: {
            path: ''//iframe 路径
        },

        // 当 moduleType == custom 时
        customConfig: {
            path: ''//自定义路由路径
        },

        // 当 moduleType == schema 时
        schemaConfig: {
            api: '',// 数据源API( 遵循 restful 规范 )
            schema: { //板块数据结构
                type: 'object',//数据结构类型,枚举值: object / array
                properties: {//数据结构属性
                    key: {//属性key
                        ...schema, // 标准schema 配置
                        type: '',//字段类型
                        label: '',//字段中文描述
                        //字段在 table 中的相关配置
                        tableOption: {
                            ...elTableCloumConfig, ////标准的 el-table-column 配置
                            toFixed: 0, //保留小数点后几位
                            visible: true,//是否在 table 中显示,false/未配置 表示不在表单展示
                        },
                        searchOption: {
                            ...eleComponentConfig,// 
                            comType: '', // 配置控件类型
                            default: '', //默认值

                            //comType == select 时
                            enumList: [{
                                value: '',//选项值
                                label: '',//选项中文描述
                            }, ...],
                            //comType == dynamic-select 时
                            api: '',// 数据源API( 遵循 restful 规范 )
                        },
                        //字段不同动态 component 中相关配置,前缀 componentConfig的键值
                        // 如 componentConfig.createFrom 这里对应 createFromOption
                        // 字段在 createFrom 中相关配置
                        createFromOption: {
                            ...eleComponentConfig,// 标准的 el-component 配置
                            comType: '', // 配置控件类型
                            visible: true,//是否在 createFrom 中显示,false/未配置 表示不在表单展示
                            disabled: false,//是否禁用,true 表示禁用,false/未配置 表示不禁用
                            default: '', //默认值

                            // comType === 'select' 时生效
                            enumList: [],
                        },
                        // 字段在 editFrom 中相关配置
                        editFromOption: {
                            ...eleComponentConfig,// 标准的 el-component 配置
                            comType: '', // 配置控件类型
                            visible: true,//是否在 editFrom 中显示,false/未配置 表示不在表单展示
                            disabled: false,//是否禁用,true 表示禁用,false/未配置 表示不禁用
                            default: '', //默认值

                            // comType === 'select' 时生效
                            enumList: [],
                        },
                        detailPanelOption: {
                            ...eleComponentConfig,// 标准的 el-component 配置
                        }
                    }
                    ...
                },
                required: [],//必填字段
            },
            //table相关配置
            tableConfig: {
                headerButtons: [{
                    label: '',//按钮中文名
                    eventKey: '',//按钮点击事件key
                    //按钮事件具体配置
                    eventOption: {
                        //eventKey === 'showComponent'
                        comName: '',// 动态组件的名称
                    },
                    ...elButtonConfig,// 标准的el-button配置   
                }, ...],
                rowButtons: [{
                    label: '',//按钮中文名
                    eventKey: '',//按钮点击事件key
                    eventOption: {
                        //当eventKey == remove
                        param: {
                            //paramKey = 参数的键值
                            // rowValueKey = 参数值 (当格式为 schema::tablekey时  到table中找到对应的字段)
                            paramKey: rowValueKey,
                        }
                    }, //按钮事件具体配置
                    ...elButtonConfig,// 标准的el-button配置   
                }, ...],
            }, // table相关配置
            searchConfig: {}, // search-bat相关配置
            //动态组件 模块组件
            componentConfig: {
                // create-from 表单相关配置
                createFrom: {
                    title: '',// 表单标题
                    saveBtnText: '',// 保存按钮文本
                },
                //edit-from 表单相关配置
                editFrom: {
                    mainKey: '', //表单主键,用于唯一标识要修改的数据对象
                    title: '',// 表单标题
                    saveBtnText: '',// 保存按钮文本
                },
                // detailPanel 详情相关 
                detailPanel: {
                    mainKey: '', //表单主键,用于唯一标识要修改的数据对象
                    title: '',// 标题
                },
            },
        },
    }, ...]
}

服务端启动

const {  serverStart } = require('@yinian-lq/elpis');

//启动 elpis 服务
const app = serverStart({})

自定义服务端

  • router-schema
  • router
  • controller
  • service
  • extend
  • config

前端构建

const { frontendBuild } = require('@yinian-lq/elpis');

// 前端工程化构建
frontendBuild(process.env._ENV);

自定义页面扩展

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

dashboard / custom 自定义页面扩展

  • app/pages/dashboard/... 目录下写页面

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

1.在 app/pages/dashboard/complex-view/schema-view/components 下写组件 2.配置到app/pages/dashboard/complex-view/schema-view/components/component-config.js 里,导出组件

schema-form 控件扩展

1.在 app/pages/widgets/schema-form/complex-view/ 下写组件 2.配置到app/pages/widgets/schema-form/complex-view/form-item-config.js 里,导出组件

schema-search-bar 控件扩展

1.在 app/pages/widgets/schema-search-bar/complex-view/ 下写组件 2.配置到app/pages/widgets/schema-search-bar/complex-view/search-item-config.js 里,导出组件