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

@julienedies/brick

v0.9.52

Published

一个借鉴angular开发模式的简洁前端开发框架,帮助组织复杂页面的前端代码.

Downloads

6

Readme

brick

wiki

home

todo example

设计与实现

brick是一个轻量级前端开发框架,基于jQuery和lodash(or underscore)。主要用于提升前端页面开发效率及复杂功能页面js代码的组织性和维护性。

其设计及实现主要借鉴并且反映了angular的前端开发思想及解决方案。

其主要思想包含两点:

1). 对代码类型进行划分,隔离。

因为前端开发通常同时涉及html、css、js,通过对代码类型进行划分,以提高代码复用性及维护性。 通常分为以下几种类型的代码:

  • controller(控制器)类型代码,主要用于衔接dom操作及service调用。
  • service(服务)类型代码:主要用于封装纯js操作类型代码,会比较接近于mvc里m的概念。复用程度高。
  • directive(指令)类型代码,通过自定义dom属性的方式为所属dom元素绑定行为。主要用于封装操作dom的代码,譬如一个典型的标签页功能。复用程度高。
2). 尽量解耦js行为与css样式。

虽然已经存在众多的UI组件,但是其使用便捷性及移植性并不好。 譬如虽然jQuery提供了jQuery UI,但实际项目开发中,很少有人会直接使用jQuery UI的样式,很多时间精力花费在样式的修改上。 考虑到这点,通过指令的形式(自定义html属性)提供基本的js行为,用户可以随意定义模板及样式;

使用

传统web页面
<link href="dist/brick.css">
<script src="dist/brick.js"></script>
electron环境
npm i @julienedies/brick
let brick = require('@julienedies/brick')
brick.bootstrap()

开发环境

brick使用webpack作为类库构建工具; 使用fis做为主页项目构建工具。

环境搭建:

  1. 本机安装nodejs;
  2. 命令行执行以下命令
git clone https://github.com/Julienedies/brick.git
cd brick
npm i fis -g // install global
npm i 

开发相关命令:

// 类库开发
npm run dev
// 类库部署
npm run pro
// 主页项目开发
npm run dev:page
// 主页项目部署
npm run pro:page