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

stbui

v1.0.8

Published

Stbui,一套为开发者准备的前端集成库,提供了配套资源,帮助你的网站快速成型。

Downloads

5

Readme

前端集成解决方案

Stbui,一套为开发者准备的前端集成库,提供了配套资源,帮助你的网站快速成型。

  • [x] 生成项目、模块、页面、组件文件结构
  • [x] JS 文件的分析、合并、压缩、版本管理
  • [x] CSS 文件的分析、合并、压缩、版本管理
  • [x] HTML 文件分析、压缩、版本管理
  • [x] 入口模块的分析、分块构建、增量构建、合并、压缩、版本管理
  • [x] 静态资源的分析、压缩、版本管理
  • [x] 图片压缩
  • [x] 文件MD5戳
  • [x] 本地预览
  • [x] 兼容 ie6 - ie11/chrome/firefox,以及各种手机浏览器
  • [x] 支持分块加载和异步加载
  • [x] 良好的构建工具配套支持

详细用法

安装 stbui

通过下面的命名即可安装 stbui

npm install -g stbui --verbose

如果安装很慢的话,可以尝试使用taobao的源进行安装。具体如下:

npm install -g stbui --registry=https://registry.npm.taobao.org --verbose

安装完成后,可以通过 stbui -v 命令查看安装的版本

创建项目

stbui 安装完成后,就可以通过下面的命令创建项目:

stbui project demo

注:demo为项目存放的目录

构建项目

stbui release dev -w

项目中有文件修改就会自动构建了。

如果要查看构建后的代码执行命令:

stbui server open

启动服务

在项目目录下执行命令

stbui server start

访问项目

打开浏览器,访问:

http://127.0.0.1:8080

项目结构

├── dist
│   └── xxx.zip
│
├── framework
│   ├── common
│       ├── images
│       ├── stbui.less
│       └── index.js
│
├── page
│   ├── page
│       ├── images
│       ├── index.less
│       ├── index.js
│       └── index.html
│
├── package.json
├── map.json
└── stbui-conf.js

stbui 命令

你可以通过 stbui -h 帮助查看相关命令

stbui release <name>    # 构建代码
stbui server <name>     # 本地服务
stubi project <name>    # 创建项目
stbui framework <name>  # 添加公共模块
stbui page <name>       # 添加业务模块
stbui-ide               # 可视化工具,需要单独安装

npm scripts

你也可以使用下面方式

npm run start   # 启动开发环境
npm run dev     # 构建开发代码
npm run bulid   # 打包产线代码
npm run ide     # 可视化工具

配置文件

默认配置文件为 stbui-conf.js,stbui 编译的整个流程都是通过配置来控制的。

如果使用中遇到什么觉得诡异的地方,欢迎拨打热线电话10086

ChangeLog