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

hc-boilerplate-console

v0.0.8

Published

管控台模板应用

Readme

管控台样板项目


开箱即用的管控台前端应用,搭配Beatle框架和Antd组件库,完成前端管控台应用的开发与设计解决方案。 样板库项目可以访问在线地址体验一下

先前技术

  1. React组件框架,构建应用界面所需的任何组件。可以通过Beatle教程快速学习,地址
  2. Antd组件库,提供应用构建最常用的React组件。
  3. Beatle应用框架,串通应用构建各个模块,让开发变得简单。

目录结构

image.png | center | 290x438

| File文件 | Purpose用途 | | :--- | :--- | | app.{jsx, less} | 应用代码入口,把界面根容器挂到具体的页面DOM | | scenes/index.{jsx, less} | 应用界面中的容器组件 | | scenes//index.{jsx, less} | 路由页面的容器组件。 | | models/.js | 描述状态数据的数据模型类 | | resources/.js | 接口资源文件 | | component//index.{jsx, less} | 组件 | | index.html | 应用启动html文件 |

随意搭配的布局

构建前端应用,换个角度说明,实际上是组合所有页面路由,不同的路由触达不同的视图,每个视图都可能需要先定义好布局,在填充页面功能。 而我们设计把布局和路由视图分开,任何路由视图只需要在定义的时候声明选择某种布局,在路由响应时会自动吧路由视图插入到指定布局中。

三大布局

  1. 控制台布局 - consoleLayout 包括标准页头和左侧导航,空白区域填充路由视图。应用的例子,一般登陆后操作的详情页都在控制台布局中。

    image.png | center | 505x393

  2. 落地页布局 - landingLayout

包括标准页尾,空白区域填充路由视图,并且整个内容页面居中显示。应用的例子有登陆、注册等会可选择落地页布局。

image.png | center | 384x308 3. 内容页布局 - contentLayout

包括面包屑和标准页尾,控台区域填充视图。

image.png | center | 398x322 实际上操作的详情页一般来说需要控制台布局搭配内容布局来完成。

image.png | center | 479x351

布局使用

路由视图组件配置exenstion#layout属性,即可应用指定布局

image.png | center | 364x154 这里RouteScene是一个路由视图(React组件)layout是一个数组,说明先把路由视图套在contentLayout,然后再整体套在consoleLayout下。

更多布局敬请期待

自动化的路由配置

scenes目录下的子目录都会自动扫描,并组装成路由。 比如scenes/test/index.jsx,通过自动化路由配置后,通过/test可以访问到该组件。而scenes/test/demo/index.jsx可以通过/test/demo 访问。

实际上样板库中已经帮你自动加载应用构建需要的模块。

image.png | center | 704x252

  1. 路由访问:scenes/ 目录下按照目录层级组合成路径,即可访问到具体的路由视图。
  2. 获取路由配置:Beatle.route('/test/demo')同样,通过目录层级组合成路径,可以获取到路由配置。