reworkcss/rework
소개
Node.js에서 CSS 전처리를 위한 플러그인 프레임워크
웹 및 앱 개발측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- -1
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Originalrework
[!NOTE]
There have not been material changes to this package in 10 years. New changes and bug fixes are not planned. In the event of concrete security issues, changes may still occur. We recommend moving to something else more modern.
CSS manipulations built on css, allowing
you to automate vendor prefixing, create your own properties, inline images,
anything you can imagine!
Please refer to css for AST documentation
and to report parser/stringifier issues.
Installation
$ npm install rework
Usage
var rework = require('rework');
var pluginA = require('pluginA');
var pluginB = require('pluginB');
rework('body { font-size: 12px; }', { source: 'source.css' })
.use(pluginA)
.use(pluginB)
.toString({ sourcemap: true })
API
rework(code, [options])
Accepts a CSS string and returns a new Rework instance. The options are
passed directly to css.parse.
Rework#use(fn)
Use the given plugin fn. A rework "plugin" is simply a function accepting the
stylesheet root node and the Rework instance.
Rework#toString([options])
Returns the string representation of the manipulated CSS. The options are
passed directly to css.stringify.
Unlike css.stringify, if you pass sourcemap: true a string will still be
returned, with the source map inlined. Also use sourcemapAsObject: true if
you want the css.stringify return value.
Plugins
Rework has a rich collection of plugins and mixins. Browse all the Rework plugins available on npm.
Plugins of particular note:
- at2x – serve high resolution images
- calc – resolve simple
calc()expressions - colors – color helpers like
rgba(#fc0, .5) - ease – several additional easing functions
- extend –
extend: selectorsupport - function – user-defined CSS functions
- import – read and inline CSS via
@import - inline – inline assets as data URIs
- mixin – custom property logic with mixins
- npm - inline CSS via
@importusing node's module resolver - references – property references like
height: @width - url – rewrite
url()s with a given function - variables – W3C-style variables
Built with rework
License
관련 프로젝트 살펴보기
불러오는 중…