--
This commit is contained in:
parent
24f3d27984
commit
6b60015c02
9588 changed files with 1149251 additions and 49 deletions
101
node_modules/rework/Readme.md
generated
vendored
Normal file
101
node_modules/rework/Readme.md
generated
vendored
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
# rework [](https://travis-ci.org/reworkcss/rework)
|
||||
|
||||
CSS manipulations built on [`css`](https://github.com/reworkcss/css), allowing
|
||||
you to automate vendor prefixing, create your own properties, inline images,
|
||||
anything you can imagine!
|
||||
|
||||
Please refer to [`css`](https://github.com/reworkcss/css) for AST documentation
|
||||
and to report parser/stringifier issues.
|
||||
|
||||
## Installation
|
||||
|
||||
$ npm install rework
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
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](https://www.npmjs.org/search?q=rework) available on npm.
|
||||
|
||||
Plugins of particular note:
|
||||
|
||||
- [at2x](https://github.com/reworkcss/rework-plugin-at2x/) – serve high resolution images
|
||||
- [calc](https://github.com/reworkcss/rework-calc) – resolve simple `calc()` expressions
|
||||
- [colors](https://github.com/reworkcss/rework-plugin-colors/) – color helpers like `rgba(#fc0, .5)`
|
||||
- [ease](https://github.com/reworkcss/rework-plugin-ease/) – several additional easing functions
|
||||
- [extend](https://github.com/reworkcss/rework-inherit/) – `extend: selector` support
|
||||
- [function](https://github.com/reworkcss/rework-plugin-function/) – user-defined CSS functions
|
||||
- [import](https://github.com/reworkcss/rework-import) – read and inline CSS via `@import`
|
||||
- [inline](https://github.com/reworkcss/rework-plugin-inline) – inline assets as data URIs
|
||||
- [mixin](https://github.com/reworkcss/rework-plugin-mixin/) – custom property logic with mixins
|
||||
- [npm](https://github.com/reworkcss/rework-npm) - inline CSS via `@import` using node's module resolver
|
||||
- [references](https://github.com/reworkcss/rework-plugin-references/) – property references like `height: @width`
|
||||
- [url](https://github.com/reworkcss/rework-plugin-url/) – rewrite `url()`s with a given function
|
||||
- [variables](https://github.com/reworkcss/rework-vars/) – W3C-style variables
|
||||
|
||||
## Built with rework
|
||||
|
||||
- [styl](https://github.com/visionmedia/styl)
|
||||
- [rework-pure-css](https://github.com/ianstormtaylor/rework-pure-css)
|
||||
- [rework-suit](https://github.com/suitcss/rework-suit)
|
||||
- [resin](https://github.com/topcoat/resin)
|
||||
- [Myth](https://github.com/segmentio/myth)
|
||||
|
||||
## License
|
||||
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2012–2013 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
Copyright (c) 2014 Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the 'Software'), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
82
node_modules/rework/index.js
generated
vendored
Normal file
82
node_modules/rework/index.js
generated
vendored
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
var css = require('css');
|
||||
var convertSourceMap = require('convert-source-map');
|
||||
var parse = css.parse;
|
||||
var stringify = css.stringify;
|
||||
|
||||
/**
|
||||
* Expose `rework`.
|
||||
*/
|
||||
|
||||
exports = module.exports = rework;
|
||||
|
||||
/**
|
||||
* Initialize a new stylesheet `Rework` with `str`.
|
||||
*
|
||||
* @param {String} str
|
||||
* @param {Object} options
|
||||
* @return {Rework}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function rework(str, options) {
|
||||
return new Rework(parse(str, options));
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize a new stylesheet `Rework` with `obj`.
|
||||
*
|
||||
* @param {Object} obj
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function Rework(obj) {
|
||||
this.obj = obj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Use the given plugin `fn(style, rework)`.
|
||||
*
|
||||
* @param {Function} fn
|
||||
* @return {Rework}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Rework.prototype.use = function(fn){
|
||||
fn(this.obj.stylesheet, this);
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Stringify the stylesheet.
|
||||
*
|
||||
* @param {Object} options
|
||||
* @return {String}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Rework.prototype.toString = function(options){
|
||||
options = options || {};
|
||||
var result = stringify(this.obj, options);
|
||||
if (options.sourcemap && !options.sourcemapAsObject) {
|
||||
result = result.code + '\n' + sourcemapToComment(result.map);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
|
||||
/**
|
||||
* Convert sourcemap to base64-encoded comment
|
||||
*
|
||||
* @param {Object} map
|
||||
* @return {String}
|
||||
* @api private
|
||||
*/
|
||||
|
||||
function sourcemapToComment(map) {
|
||||
var content = convertSourceMap.fromObject(map).toBase64();
|
||||
return '/*# sourceMappingURL=data:application/json;base64,' + content + ' */';
|
||||
}
|
||||
133
node_modules/rework/package.json
generated
vendored
Normal file
133
node_modules/rework/package.json
generated
vendored
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "rework@~1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "rework",
|
||||
"name": "rework",
|
||||
"rawSpec": "~1.0.0",
|
||||
"spec": ">=1.0.0 <1.1.0",
|
||||
"type": "range"
|
||||
},
|
||||
"/Users/jose/Documents/GitHub/Mods/node_modules/gulp-concat-css"
|
||||
]
|
||||
],
|
||||
"_from": "rework@>=1.0.0 <1.1.0",
|
||||
"_id": "rework@1.0.1",
|
||||
"_inCache": true,
|
||||
"_location": "/rework",
|
||||
"_npmUser": {
|
||||
"name": "necolas",
|
||||
"email": "nicolasgallagher@gmail.com"
|
||||
},
|
||||
"_npmVersion": "1.4.3",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "rework@~1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "rework",
|
||||
"name": "rework",
|
||||
"rawSpec": "~1.0.0",
|
||||
"spec": ">=1.0.0 <1.1.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-concat-css"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/rework/-/rework-1.0.1.tgz",
|
||||
"_shasum": "30806a841342b54510aa4110850cd48534144aa7",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "rework@~1.0.0",
|
||||
"_where": "/Users/jose/Documents/GitHub/Mods/node_modules/gulp-concat-css",
|
||||
"author": {
|
||||
"name": "TJ Holowaychuk",
|
||||
"email": "tj@vision-media.ca"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/reworkcss/rework/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"convert-source-map": "^0.3.3",
|
||||
"css": "^2.0.0"
|
||||
},
|
||||
"description": "Plugin framework for CSS preprocessing",
|
||||
"devDependencies": {
|
||||
"mocha": "^1.20.1",
|
||||
"should": "^4.0.4"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "30806a841342b54510aa4110850cd48534144aa7",
|
||||
"tarball": "https://registry.npmjs.org/rework/-/rework-1.0.1.tgz"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/reworkcss/rework",
|
||||
"keywords": [
|
||||
"css",
|
||||
"manipulation",
|
||||
"preprocess",
|
||||
"transform",
|
||||
"server"
|
||||
],
|
||||
"main": "index",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "tjholowaychuk",
|
||||
"email": "tj@vision-media.ca"
|
||||
},
|
||||
{
|
||||
"name": "jonathanong",
|
||||
"email": "jonathanrichardong@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "jongleberry",
|
||||
"email": "jonathanrichardong@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "conradz",
|
||||
"email": "me@conradz.com"
|
||||
},
|
||||
{
|
||||
"name": "necolas",
|
||||
"email": "nicolasgallagher@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "anthonyshort",
|
||||
"email": "antshort@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "ianstormtaylor",
|
||||
"email": "ian@ianstormtaylor.com"
|
||||
},
|
||||
{
|
||||
"name": "moox",
|
||||
"email": "m@moox.io"
|
||||
},
|
||||
{
|
||||
"name": "clintwood",
|
||||
"email": "clint@anotherway.co.za"
|
||||
},
|
||||
{
|
||||
"name": "lydell",
|
||||
"email": "simon.lydell@gmail.com"
|
||||
},
|
||||
{
|
||||
"name": "slexaxton",
|
||||
"email": "alexsexton@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "rework",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/reworkcss/rework.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha --require should --reporter spec"
|
||||
},
|
||||
"version": "1.0.1"
|
||||
}
|
||||
Loading…
Reference in a new issue