Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cmui-brush

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cmui-brush

Lightweight utility library for Stylus.

  • 0.1.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Brush

Lightweight utility library for Stylus.

Inspired by nib.

Stylus 是一款 CSS 预处理器,与 Sass 和 Less 相比,Stylus 更像是一门编程语言,功能更为强大和灵活。同时,Stylus 完全基于 JavaScript 开发,对 Node.js 工具链极为友好。

而 Brush 是专为 Stylus 编写的工具库,充分利用 Stylus 的变量、Mixin、插值等特性,为现代 CSS 开发提供更舒适的编程体验。

安装

通过 npm 安装:

$ npm install cmui-brush

使用

在源码中使用
  1. 在你的样式文件中导入 Brush:

    @import './node_modules/cmui-brush/brush'
    
  2. 随后即可使用 Brush 提供的各项 API。

在构建环节中使用

如果你使用 gulp-stylus 来处理 Stylus 的编译,则可以在编译过程中以插件的方式来加载 Brush。请参考以下代码:

var gulp = require('gulp')
var stylus = require('gulp-stylus')
var brush = require('cmui-brush')

gulp.task('css', function () {
	return gulp.src('./path/to/src/*.styl')
		.pipe(stylus({
			use: [brush()],
		}))
		.pipe(gulp.dest('./path/to/dest/'))
})

谁在用?

移动 UI 框架 CMUI v2 采用 Brush 作为全局的样式工具库,因此所有 CMUI v2 的用户都在使用它:


License

MIT License

Keywords

FAQs

Package last updated on 17 Nov 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc