+ gulp-autoprefixer node module;

= package.json gulp-autoprifixer field;
This commit is contained in:
tmshv committed 2014-03-15 14:42:39 +04:00
1 parent 00f7f611ff
commit a71eb79001
423 files changed
+26150 -1

No files matched your search

+1
View File
@@ -0,0 +1 @@
node_modules/
+20
View File
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2013 Michael Ostermann metrime@icloud.com
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.
+21
View File
@@ -0,0 +1,21 @@
gulp-autoprefixer
===========
[Autoprefixer](https://github.com/ai/autoprefixer) for [gulp](https://github.com/wearefractal/gulp).
var prefix = require('gulp-autoprefixer');
Example
-------
gulp.src('./css/*.css')
.pipe(prefix("last 1 version", "> 1%", "ie 8", "ie 7"))
.pipe(gulp.dest('./dist/'))
License
-------
MIT
+58
View File
@@ -0,0 +1,58 @@
/* jshint node:true */
'use strict';
var prefix = require('autoprefixer'),
gutil = require('gulp-util'),
transform = require('stream').Transform,
bufferstreams = require('bufferstreams'),
PLUGIN_NAME = 'gulp-autoprefixer';
function autoprefixerTransform(opts) {
// Returns a callback that handles the buffered content
return function(err, buffer, callback) {
if (err) {
callback(gutil.PluginError(PLUGIN_NAME, err));
}
var prefixed = prefix(opts).process(String(buffer)).css;
callback(null, new Buffer(prefixed));
};
}
function gulpautoprefixer() {
var stream = new transform({ objectMode: true }),
opts = arguments.length > 0 ? [].slice.call(arguments, 0) : ['> 1%','last 2 versions','ff 17','opera 12.1'];
stream._transform = function(file, unused, done) {
// Pass through if null
if (file.isNull()) {
stream.push(file);
done();
return;
}
if (file.isStream()) {
try {
file.contents = file.contents.pipe(new bufferstreams(autoprefixerTransform(opts)));
} catch (err) {
err.fileName = file.path;
stream.emit('error', new gutil.PluginError('gulp-autoprefixer', err));
}
stream.push(file);
done();
} else {
try {
var prefixed = prefix(opts).process(String(file.contents)).css;
file.contents = new Buffer(prefixed);
} catch (err) {
err.fileName = file.path;
stream.emit('error', new gutil.PluginError('gulp-autoprefixer', err));
}
stream.push(file);
done();
}
};
return stream;
}
gulpautoprefixer.autoprefixerTransform = autoprefixerTransform;
module.exports = gulpautoprefixer;
+1
View File
@@ -0,0 +1 @@
../autoprefixer/bin/autoprefixer
+276
View File
@@ -0,0 +1,276 @@
## 1.0 “Plus ultra”
* Source map support.
* Save origin indents and code formatting.
* Change CSS parser to PostCSS.
* Preserve vendor-prefixed properties put right after unprefixed ones.
* Rename compile() to process() and return result object, instead of CSS string.
* Rename inspect() to info().
* Add in binary -d option to specify output directory.
* Binary now will not concat output files.
* Allow to select last versions for specified browser.
* Add full browser names aliases: `firefox`, `explorer` and `blackberry`.
* Ignore case in browser names.
* Change license to MIT.
* Add prefixes inside custom at-rules.
* Add only necessary prefixes to selector inside prefixed at-rule.
* Safer backgrounds list parser in gradient hack.
* Prefix @keyframes inside @media.
* Don’t prefix values for CSS3 PIE properties.
* Binary now shows file name in syntax error.
* Use browserify to build standalone version.
### 20131225:
* Fix deprecated API convertor.
* Add ::placeholder support for Firefix >= 18.
* Fix vendor prefixes order.
### 20140103:
* Add webkit prefix for sticky position.
* Update browsers popularity statistics.
### 20140109:
* Add selectors and at-rules sections to debug info.
* Fix outdated prefixes cleaning.
### 20140110:
* Add `Firefox ESR` browser requirement.
* Opera 18 is moved to released versions.
* Add Opera 20 data.
### 20140117:
* Chrome 32 is moved to released versions.
* Add Opera 34 data.
### 20140130:
* Fix flexbox properties names in transitions.
* Add Chrome 35 and Firefox 29 data.
### 20140203:
* Android 4.4 stock browser and Opera 19 are moved to released versions.
* Add Opera 21 data.
* Update browsers usage statistics.
### 20140213
* Add case insensitive to IE’s filter hack (by Dominik Schilling).
* Improve selector prefixing in some rare cases (by Simon Lydell).
* Firefox 27 is moved to released versions.
* Add Firefox 30 data.
## 0.8 “Unbowed, Unbent, Unbroken”
* Add more browsers to defaults ("> 1%, last 2 versions, ff 17, opera 12.1"
instead of just "last 2 browsers").
* Keep vendor prefixes without unprefixed version (like vendor-specific hacks).
* Convert gradients to old WebKit syntax (actual for Android 2.3).
* Better support for several syntaxes with one prefix (like Flexbox and
gradients in WebKit).
* Add intrinsic and extrinsic sizing values support.
* Remove never existed prefixes from common mistakes (like -ms-transition).
* Add Opera 17 data.
* Fix selector prefixes order.
* Fix browser versions order in inspect.
### 20130903:
* Fix old WebKit gradients convertor on rgba() colors.
* Allow to write old direction syntax in gradients.
### 20130906:
* Fix direction syntax in radial gradients.
* Don’t prefix IE filter with modern syntax.
### 20130911:
* Fix parsing property name with spaces.
### 20130919:
* Fix processing custom framework prefixes (by Johannes J. Schmidt).
* Concat outputs if several files compiled to one output.
* Decrease standalone build size by removing unnecessary Binary class.
* iOS 7 is moved to released versions.
* Clean up binary code (by Simon Lydell).
### 20130923:
* Firefox 24 is moved to released versions.
### 20131001:
* Add support for grab, grabbing, zoom-in and zoom-out cursor values.
### 20131006:
* Chrome 30 is moved to released versions.
### 20131007:
* Don’t add another prefixes in rule with prefixed selector.
### 20131009:
* Opera 17 is moved to released versions.
### 20131015:
* Fix converting multiple gradients to old webkit syntax (by Aleksei Androsov).
### 20131017:
* Fix @host at-rule parsing.
### 20131020:
* IE 11 and Andrid 4.3 is moved to released versions.
* Add Opera 18 data.
* Add @namespace support.
* Sort browser versions in data file.
### 20131029:
* Add Safari 6.1 data.
* Add fx alias for Firefox.
### 20131104:
* Update Android future version to 4.4.
* Google Chrome 32 added to future versions list.
* Firefox 25 now is actual version, 27 and 28 added to future versions.
* Browsers statistics are updated.
### 20131205:
* Google Chrome 33 added to future releases list.
* Google Chrome 31 moved to current releases list.
### 20131209:
* Use old webkit gradients for old iOS and Safari (by Chad von Nau).
* Fix direction conversion for old webkit gradients (by Chad von Nau).
* Update browsers popularity statistics.
### 20131213:
* Firefox ESR in default browsers was changed to 24 version.
* Firefox 26 was moved to current releases list.
* Firefox 28 was added to future releases list.
## 0.7 “We Do Not Sow”
* Add vendor prefixes to selectors.
* Add ::selection and ::placeholder selectors support.
* Allow to load support data from Can I Use pull requests.
* Remove deprecated API.
### 20130806:
* Add hyphens support.
### 20130807:
* Add tab-size support.
* Add :fullscreen support.
### 20130808:
* Allow to select browser versions by > and >= operator.
* Fix flex properties in transition.
### 20130810:
* Add Firefox 25 data.
### 20130824:
* Add Chrome 31 and 30 data.
* Fix CSS comments parsing (by vladkens).
## 0.6 “As High As Honor”
* New faster API, which cache preprocessed data. Old API is deprecated.
* A lot of perfomance improvements.
* Add Opera 15 -webkit- prefix support.
* Update Chrome 29 and Safari 7 prefixes data.
* Add minor browsers in popularity select.
* Better syntax error messages.
### 20130721:
* Add Chrome 30 data.
### 20130728:
* Don’t remove non-standard -webkit-background-clip: text.
* Don’t remove IE hack on CSS parse.
### 20130729:
* Add Opera 16 data.
* Fix “Invalid range in character class” error on Firefox.
### 20130730:
* Fix correct clone comments inside keyframes (by Alexey Plutalov).
* Fix angle recalculation in gradients (by Roman Komarov).
### 20130731:
* Add border-image support.
## 0.5 “Ours is the Fury”
* Rewrite Autoprefixer to be more flexible.
* Use css, instead of Rework, to fix CSS parsing errors faster.
* Fix a lot of CSS parsing errors.
### 20130616:
* More useful message for CSS parsing errors.
* Remove old WebKit gradient syntax.
* Fix parsing error on comment with braces.
### 20130617:
* Remove old Mozilla border-radius.
* Don’t prefix old IE filter.
* Remove old background-clip, background-size and background-origin prefixes.
* Speed up regexps in values.
* Allow to hack property declarations.
### 20130625:
* Convert flexbox properties to 2009 and 2012 specifications.
* Improve messages on syntax errors.
### 20130626:
* Add Firefox 24 data.
* Add prefixes for font-feature-settings.
### 20130629:
* Fix convert flex properties to old box-flex.
## 0.4 “Winter Is Coming”
* Remove outdated prefixes.
* Add border-radius and box-shadow properties to database.
* Change degrees in webkit gradients.
### 20130515:
* Add old syntax in gradient direction.
* Add old syntax for display: flex.
* Update browser global usage statistics.
### 20130521:
* Add Firefox 23 data.
### 20130524:
* Add Chrome 29 data.
### 20130528:
* Fix compatibilty with Rework from git master.
* Add minor browsers to data, which can be selected only directly.
### 20130530:
* Add Opera 15 and iOS 6.1 data.
* Fix iOS versions in properties and values data.
### 20130603:
* Use latest Rework 0.15 with a lot of CSS parsing fixes.
* Update browsers usage statistics.
## 0.3 “Growing Strong”
* Rename `autoprefixer.filter()` to `autoprefixer.rework()`.
* Use own filters instead of Rework’s `prefix` and `prefixValue`.
* Smarter value prefixer without false match “order” in “border”.
* 40% faster.
* Don’t add unnecessary properties instead of Rework’s `prefixValue`.
* Don’t change properties order.
* Sort properties and values in inspect output.
* Add main to component config (by Jonathan Ong).
* Fix documentation (by Sergey Leschina and Mark Vasilkov).
### 20130424:
* Fix value override in prefixer.
### 20130427:
* Prefix several same values in one property.
* Fix Windows support in binary.
* Improve print errors in binary.
### 20130502:
* Don’t add -webkit- prefix to IE filter.
* Don’t duplicate prefixes on second run.
## 0.2 “Hear Me Roar!”
* Update parse libraries.
* Use component package manager to build standalone script.
* Add inspect to standalone script.
## 0.1 “Fire and Blood”
* Initial release.
+20
View File
@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright 2013 Andrey Sitnik <andrey@sitnik.ru>
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.
+474
View File
@@ -0,0 +1,474 @@
# Autoprefixer
<img align="right" width="94" src="http://ai.github.io/autoprefixer/logo.svg" title="Autoprefixer logo by Anton Lovchikov">
Parse CSS and add vendor prefixes to CSS rules using values
from the [Can I Use](http://caniuse.com/).
Write your CSS rules without vendor prefixes (in fact, forget about them
entirely):
```css
:fullscreen a {
transition: transform 1s
}
```
Process your CSS by Autoprefixer:
```js
var prefixed = autoprefixer.process(css).css;
```
It will use the data on current browser popularity and properties support
to apply prefixes for you:
```css
:-webkit-full-screen a {
-webkit-transition: -webkit-transform 1s;
transition: transform 1s
}
:-moz-full-screen a {
transition: transform 1s
}
:-ms-fullscreen a {
transition: transform 1s
}
:fullscreen a {
-webkit-transition: -webkit-transform 1s;
transition: transform 1s
}
```
You can play with your CSS in [interactive demo] of Autoprefixer.
Twitter account for news and releases: [@autoprefixer].
Sponsored by [Evil Martians]. Based on [PostCSS] framework.
[interactive demo]: http://jsfiddle.net/simevidas/udyTs/show/light/
[@autoprefixer]: https://twitter.com/autoprefixer
[Evil Martians]: http://evilmartians.com/
[PostCSS]: https://github.com/ai/postcss
## Features
### Forget about prefixes
The best tool is a tool you can't see and one that does the work for you.
This is the main idea behind Autoprefixer.
Autoprefixer interface is simple: just forget about vendor prefixes
and write normal CSS according to latest W3C specs. You don’t need
a special language (like Sass) or special mixins.
Because Autoprefixer is a postprocessor for CSS,
you can also use it with preprocessors, such as Sass, Stylus or LESS.
### Actual data from Can I Use
Autoprefixer uses the most recent data from [Can I Use](http://caniuse.com/),
understands which browsers are actual and popular and adds only the necessary
vendor prefixes.
It also cleans your CSS from old prefixes (like prefixed `border-radius`,
produced by many CSS libraries):
```css
a {
-webkit-border-radius: 5px;
border-radius: 5px
}
```
compiles to:
```css
a {
border-radius: 5px
}
```
Note, that Autoprefixer doesn’t load Can I Use data every time. This data
is already packed to release, so with same Autoprefixer version you always will
have same output result.
### Flexbox, Gradients, etc.
Flexbox or gradients have different syntaxes in different browsers
(sometimes you need to recalculate angles, sometimes you need 2 old properties
instead of new one), but Autoprefixer hides this from you.
Just code by latest W3C specs and Autoprefixer will produce the code
for old browsers:
```css
a {
display: flex;
}
```
compiles to:
```css
a {
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex
}
```
Autoprefixer has [22 special hacks] to fix browser’s differences.
[22 special hacks]: https://github.com/ai/autoprefixer/tree/master/lib/hacks
### Fast
Autoprefixer is about 16 times faster than Compass and 8 times faster
than Stylus.
On a Core i7 with 10 GB of RAM and SSD, benchmark with GitHub styles is:
```
~/Dev/autoprefixer$ ./node_modules/.bin/cake bench
Load GitHub styles
Autoprefixer: 489 ms
Compass: 4156 ms (8.5 times slower)
Stylus: 4165 ms (8.5 times slower)
```
Unlike [-prefix-free](http://leaverou.github.io/prefixfree/), Autoprefixer
compiles CSS once on deploy and doesn’t hit client-side performance.
## Browsers
You can specify the browsers you want to target in your project:
```js
autoprefixer("last 1 version", "> 1%", "Explorer 7").process(css).css;
```
* `last 2 versions` is last versions for each browser. Like “last 2 versions”
[strategy](http://support.google.com/a/bin/answer.py?answer=33864) in
Google.
* `last 2 Chrome versions` is last versions of specify browser.
* `> 5%` is browser versions, selected by global usage statistics.
* `Firefox > 20` is Firefox newer versions than 20.
* `Firefox >= 20` is Firefox version 20 or newer.
* `Firefix ESR` is latest [Firefox ESR] version.
* `none` don’t set any browsers to clean CSS from any vendor prefixes.
* You can also set browsers directly.
Blackberry and stock Android browsers will not be used in `last n versions`.
You can add them by name:
```js
autoprefixer("last 1 version", "BlackBerry 10", "Android 4").process(css).css;
```
Browsers names (case insensitive):
* `Android` for old Android stock browser.
* `BlackBerry` or `bb` for Blackberry browser.
* `Chrome` for Google Chrome.
* `Firefox` or `ff` for Mozilla Firefox.
* `Explorer` or `ie` for Internet Explorer.
* `iOS` for iOS Safari.
* `Opera` for Opera.
* `Safari` for desktop Safari.
By default, Autoprefixer uses `> 1%, last 2 versions, Firefox ESR, Opera 12.1`:
* Latest [Firefox ESR] is a 24 version.
* Opera 12.1 will be in list until Opera supports non-Blink 12.x branch.
[Firefox ESR]: http://www.mozilla.org/en/firefox/organizations/faq/
## Source Map
Autoprefixer will generate a source map if you set `map` option to `true`.
You must set input and output CSS files paths (by `from` and `to` options)
to generate a correct map.
```js
var result = autoprefixer.process(css, {
map: true,
from: 'main.css',
to: 'main.out.css'
});
result.css //=> Prefixed CSS
result.map //=> Source map content
fs.writeFileSync('main.out.css.map', result.map);
```
Autoprefixer can also modify previous source map (for example, from Sass
compilation). Just set original source map content (as string or JS object)
to `map` option:
```js
var result = autoprefixer.process(css, {
map: fs.readFileSync('main.sass.css.map'),
from: 'main.sass.css',
to: 'main.min.css'
});
result.map //=> Source map from main.sass to main.min.css
```
## Debug
You can check which browsers are selected and which properties will be prefixed:
```js
info = autoprefixer("last 1 version").info();
console.log(info);
```
Or by CLI command:
```sh
autoprefixer -i
```
## FAQ
### Does it add polyfills for old browsers?
No. Autoprefixer only adds prefixes, not polyfills. There are two reasons:
1. Prefixes and polyfills are very different and need a different API.
Two separate libraries would be much better.
2. Most of IE polyfills are very bad for client perfomance. They use slow hacks
and old IEs is mostly used on old hardware. Most of CSS 3 features that is
only used for styling should be ignored in old IEs as it is recommended in
Graceful Degradation.
### Why don’t gradients work in Firefox?
Check that you use correct [direction syntax]. For example, you should use
`to bottom` instead of `top`:
```css
a {
background: linear-gradient(to bottom, white, black)
}
```
Unfortunately, unprefixed gradients use different direction syntax, that most
of old gradients examples, so be careful and use always latest W3C specs with
Autoprefixer.
[direction syntax]: https://developer.mozilla.org/en-US/docs/Web/CSS/linear-gradient
### Why doesn’t Autoprefixer add prefixes to `border-radius`?
Developers are often surprised by how few prefixes are required today.
If Autoprefixer doesn’t add prefixes to your CSS, check if they’re still
required on [Can I Use](http://caniuse.com/).
If a prefix is required, but Autoprefixer doesn’t add it or adds it
incorrectly, please
[report an issue](https://github.com/ai/autoprefixer/issues/new)
and include your source CSS and expected output.
### Why doesn’t Autoprefixer support `appearance`?
Unlike `transition`, the `appearance` property is not a part of
any specification. So there is no `appearance`, only `-moz-appearance`
and `-webkit-appearance`. Quote from [MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/-moz-appearance):
> Do not use this property on Web sites: not only is it non-standard, but its
> behavior changes from one browser to another. Even the keyword `none` does not
> have the same behavior on each form element across different browsers, and
> some do not support it at all.
## Usage
### Grunt
You can use the
[grunt-autoprefixer](https://github.com/nDmitry/grunt-autoprefixer)
plugin for Grunt. Install the npm package and add it to Gruntfile:
```js
grunt.loadNpmTasks('grunt-autoprefixer');
```
### Compass
If you use Compass binary to compile your styles, you can easily integrate
Autoprefixer with it. Install `autoprefixer-rails` gem:
```
gem install autoprefixer-rails
```
and add post-compile hook to `config.rb`:
```ruby
require 'autoprefixer-rails'
require 'csso'
on_stylesheet_saved do |file|
css = File.read(file)
File.open(file, 'w') do |io|
io << AutoprefixerRails.process(css)
end
end
```
You can set browsers array as second argument in `process` method:
```ruby
io << AutoprefixerRails.process(css, ["last 1 version", "> 1%", "Explorer 7"])
```
### Stylus
If you use Stylus CLI, you can add Autoprefixer by
[autoprefixer-stylus](https://github.com/jenius/autoprefixer-stylus) plugin.
Just install npm package and use it in `-u` option:
```
stylus -u autoprefixer-stylus file.css
```
### Ruby on Rails
Add [autoprefixer-rails](https://github.com/ai/autoprefixer-rails) gem
to `Gemfile` and write CSS in a usual way:
```ruby
gem "autoprefixer-rails"
```
### Ruby
You can integrate Autoprefixer into your Sprockets environment
by `autoprefixer-rails` gem:
```ruby
AutoprefixerRails.install(sprockets_env)
```
or process CSS from plain Ruby:
```ruby
prefixed = AutoprefixerRails.compile(css)
```
### Prepros
If you want to build your assets in GUI, try
[Prepros](http://alphapixels.com/prepros/). Just set “Auto Prefix CSS”
[checkbox](https://f.cloud.github.com/assets/3478693/930798/faa29892-0016-11e3-8901-87850de7aed2.jpg)
in right panel.
<img src="http://alphapixels.com/prepros/static/img/prepros.jpg" width="550" height="340" />
### Mincer
To use Autoprefixer in [Mincer](https://github.com/nodeca/mincer),
install `autoprefixer` npm package and enable it:
```js
environment.enable('autoprefixer');
```
### Middleman
Add [middleman-autoprefixer](https://github.com/porada/middleman-autoprefixer)
gem to `Gemfile`:
```ruby
gem "middleman-autoprefixer"
```
and activate the extension in your project’s `config.rb`:
```ruby
activate :autoprefixer
```
### Node.js
Use `autoprefixer` npm package:
```js
var autoprefixer = require('autoprefixer');
var css = 'a { transition: transform 1s }';
var prefixed = autoprefixer.process(css).css;
```
### PHP
You can use Autoprefixer in PHP by
[autoprefixer-php](https://github.com/vladkens/autoprefixer-php) library:
```php
$autoprefixer = new Autoprefixer();
$css = 'a { transition: transform 1s }';
$prefixed = $autoprefixer->compile($css);
```
### JavaScript
You can use Autoprefixer in the browser or a non-Node.js runtime
with [standalone version](https://raw.github.com/ai/autoprefixer-rails/master/vendor/autoprefixer.js).
### PostCSS
Autoprefixer can be also used as a [PostCSS](https://github.com/ai/postcss)
processor, so you can combine it with other processors and parse CSS only once:
```js
postcss().
use( autoprefixer(['> 1%', 'opera 12.5']).postcss ).
use( compressor ).
process(css);
```
### Sublime Text
You can process your styles directly in Sublime Text with the
[sublime-autoprefixer](https://github.com/sindresorhus/sublime-autoprefixer)
plugin.
### Brackets
Styles can processed automatically in Brackets using the
[brackets-autoprefixer](https://github.com/mikaeljorhult/brackets-autoprefixer)
extension.
### Others
You can use the `autoprefixer` binary to process CSS files using
any assets manager:
```
sudo npm install --global autoprefixer
autoprefixer *.css
```
See `autoprefixer -h` for help.
## In-package Update
It’s highly recommended that you always use the latest version of Autoprefixer.
If by any chance you or your company are not able to update the package
(e.g. in case of long test periods before any library updates), you can still
update the very browser data that Autoprefixer fetches from Can I Use:
```
autoprefixer --update
```
Note that the in-package update doesn’t get any code fixes nor the
implementation of new features. It just keeps the browser popularity and
support data up to date, and adds new browser versions.
+13
View File
@@ -0,0 +1,13 @@
#!/usr/bin/env node
(function() {
var Binary, binary;
Binary = require('../lib/binary');
binary = new Binary(process);
binary.run(function() {
return process.exit(binary.status);
});
}).call(this);
@@ -0,0 +1,50 @@
(function() {
module.exports = {
android: {
prefix: "-webkit-",
minor: true,
versions: [4.4, 4.3, 4.2, 4.1, 4, 3, 2.3, 2.2, 2.1],
popularity: [0.0894926, 0.74151, 0.74151, 2.29485, 1.0803, 0.00639233, 1.35517, 0.0831003, 0.0255693]
},
bb: {
prefix: "-webkit-",
minor: true,
versions: [10, 7],
popularity: [0, 0.153316]
},
chrome: {
prefix: "-webkit-",
future: [35, 34, 33],
versions: [32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4],
popularity: [15.5204, 15.3756, 0.411642, 0.480249, 0.274428, 0.312543, 0.221067, 0.121968, 0.068607, 0.083853, 0.121968, 0.480249, 0.045738, 0.038115, 0.099099, 0.030492, 0.038115, 0.068607, 0.045738, 0.053361, 0.060984, 0.121968, 0.038115, 0.015246, 0.022869, 0.022869, 0.030492, 0.022869, 0.022869]
},
ff: {
prefix: "-moz-",
future: [30, 29, 28],
versions: [27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3.6, 3.5, 3, 2],
popularity: [0.472626, 11.9757, 0.411642, 0.266805, 0.15246, 0.137214, 0.15246, 0.114345, 0.106722, 0.099099, 0.137214, 0.160083, 0.099099, 0.07623, 0.083853, 0.175329, 0.07623, 0.106722, 0.045738, 0.068607, 0.030492, 0.045738, 0.038115, 0.060984, 0.251559, 0.038115, 0.091476, 0.015246]
},
ie: {
prefix: "-ms-",
versions: [11, 10, 9, 8, 7, 6, 5.5],
popularity: [6.40778, 3.74183, 3.18016, 5.65625, 0.213593, 0.28479, 0.009298]
},
ios: {
prefix: "-webkit-",
versions: [7, 6.1, 6, 5.1, 5, 4.3, 4.2, 4.1, 4, 3.2],
popularity: [4.18754, 0.4515445, 0.4515445, 0.1317005, 0.1317005, 0.01075105, 0.01075105, 0.00537555, 0.00537555, 0]
},
opera: {
prefix: "-o-",
future: [21, 20],
versions: [19, 18, 17, 16, 15, 12.1, 12, 11.6, 11.5, 11.1, 11, 10.6, 10.5, 10.1, 10, 9.6, 9.5],
popularity: [0.038115, 0.358281, 0.030492, 0.022869, 0.015246, 0.419265, 0.038115, 0.030492, 0.015246, 0.008219, 0.008219, 0.007623, 0.008392, 0.007623, 0.007623, 0.0038115, 0.0038115]
},
safari: {
prefix: "-webkit-",
versions: [7, 6.1, 6, 5.1, 5, 4, 3.2, 3.1],
popularity: [1.11296, 0.815661, 0.602217, 0.930006, 0.274428, 0.114345, 0.008692, 0]
}
};
}).call(this);
@@ -0,0 +1,311 @@
(function() {
module.exports = {
"::placeholder": {
selector: true,
browsers: ["android 4.4", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4 old", "ff 5 old", "ff 6 old", "ff 7 old", "ff 8 old", "ff 9 old", "ff 10 old", "ff 11 old", "ff 12 old", "ff 13 old", "ff 14 old", "ff 15 old", "ff 16 old", "ff 17 old", "ff 18 old", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ie 10", "ie 11", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"::selection": {
selector: true,
browsers: ["ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30"]
},
":fullscreen": {
selector: true,
browsers: ["chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ie 11", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"@keyframes": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"align-content": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
"align-items": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
"align-self": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
animation: {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"animation-delay": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"animation-direction": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"animation-duration": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"animation-fill-mode": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"animation-iteration-count": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"animation-name": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"animation-play-state": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"animation-timing-function": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"backface-visibility": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ie 9", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"background-clip": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "ff 3.6", "opera 10", "opera 10.1"]
},
"background-origin": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "ff 3.6", "opera 10", "opera 10.1"]
},
"background-size": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "ff 3.6", "opera 10", "opera 10.1"]
},
"border-bottom-left-radius": {
mistakes: ["-ms-"],
browsers: ["android 2.1", "chrome 4", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ios 3.2", "safari 3.1", "safari 3.2", "safari 4"],
transition: true
},
"border-bottom-right-radius": {
mistakes: ["-ms-"],
browsers: ["android 2.1", "chrome 4", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ios 3.2", "safari 3.1", "safari 3.2", "safari 4"],
transition: true
},
"border-image": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 12.1", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1"]
},
"border-radius": {
mistakes: ["-ms-"],
browsers: ["android 2.1", "chrome 4", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ios 3.2", "safari 3.1", "safari 3.2", "safari 4"],
transition: true
},
"border-top-left-radius": {
mistakes: ["-ms-"],
browsers: ["android 2.1", "chrome 4", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ios 3.2", "safari 3.1", "safari 3.2", "safari 4"],
transition: true
},
"border-top-right-radius": {
mistakes: ["-ms-"],
browsers: ["android 2.1", "chrome 4", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ios 3.2", "safari 3.1", "safari 3.2", "safari 4"],
transition: true
},
"box-shadow": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "bb 7", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "ff 3.5", "ff 3.6", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "safari 3.1", "safari 3.2", "safari 4", "safari 5"],
transition: true
},
"box-sizing": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "bb 7", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "safari 3.1", "safari 3.2", "safari 4", "safari 5"]
},
"break-after": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"break-before": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"break-inside": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
calc: {
props: ["*"],
browsers: ["bb 10", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 6", "ios 6.1", "safari 6"]
},
"column-count": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"column-fill": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"column-gap": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"],
transition: true
},
"column-rule": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"],
transition: true
},
"column-rule-color": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"],
transition: true
},
"column-rule-style": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"column-rule-width": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"],
transition: true
},
"column-span": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"column-width": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"],
transition: true
},
columns: {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"],
transition: true
},
"display-flex": {
props: ["display"],
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
"fill-available": {
props: ["width", "min-width", "max-width", "height", "min-height", "max-height"],
browsers: ["android 4.4", "bb 10", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"]
},
filter: {
browsers: ["android 4.4", "bb 10", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6", "safari 6.1", "safari 7"],
transition: true
},
"fit-content": {
props: ["width", "min-width", "max-width", "height", "min-height", "max-height"],
browsers: ["android 4.4", "bb 10", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"]
},
flex: {
transition: true,
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
"flex-basis": {
transition: true,
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
"flex-direction": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
"flex-flow": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
"flex-grow": {
transition: true,
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
"flex-shrink": {
transition: true,
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
"flex-wrap": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
"font-feature-settings": {
browsers: ["android 4.4", "bb 10", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"]
},
"font-kerning": {
browsers: ["android 4.4", "bb 10", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"]
},
"font-language-override": {
browsers: ["android 4.4", "bb 10", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"]
},
"font-variant-ligatures": {
browsers: ["android 4.4", "bb 10", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"]
},
grab: {
props: ["cursor"],
browsers: ["chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
grabbing: {
props: ["cursor"],
browsers: ["chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
hyphens: {
browsers: ["ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ie 10", "ie 11", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"inline-flex": {
props: ["display"],
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
"justify-content": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
"linear-gradient": {
props: ["background", "background-image", "border-image"],
mistakes: ["-ms-"],
browsers: ["android 2.1 old", "android 2.2 old", "android 2.3 old", "android 3 old", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2 old", "ios 4 old", "ios 4.1 old", "ios 4.2 old", "ios 4.3 old", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 4 old", "safari 5 old", "safari 5.1", "safari 6"]
},
"max-content": {
props: ["width", "min-width", "max-width", "height", "min-height", "max-height"],
browsers: ["android 4.4", "bb 10", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"]
},
"min-content": {
props: ["width", "min-width", "max-width", "height", "min-height", "max-height"],
browsers: ["android 4.4", "bb 10", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 6.1", "safari 7"]
},
order: {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4 2009", "chrome 5 2009", "chrome 6 2009", "chrome 7 2009", "chrome 8 2009", "chrome 9 2009", "chrome 10 2009", "chrome 11 2009", "chrome 12 2009", "chrome 13 2009", "chrome 14 2009", "chrome 15 2009", "chrome 16 2009", "chrome 17 2009", "chrome 18 2009", "chrome 19 2009", "chrome 20 2009", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ie 10", "ios 3.2 2009", "ios 4 2009", "ios 4.1 2009", "ios 4.2 2009", "ios 4.3 2009", "ios 5 2009", "ios 5.1 2009", "ios 6 2009", "ios 6.1 2009", "ios 7", "opera 15", "opera 16", "safari 3.1 2009", "safari 3.2 2009", "safari 4 2009", "safari 5 2009", "safari 5.1 2009", "safari 6 2009", "safari 6.1 2009", "safari 7"]
},
perspective: {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ie 9", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"],
transition: true
},
"perspective-origin": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ie 9", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"],
transition: true
},
"radial-gradient": {
props: ["background", "background-image", "border-image"],
mistakes: ["-ms-"],
browsers: ["android 2.1 old", "android 2.2 old", "android 2.3 old", "android 3 old", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2 old", "ios 4 old", "ios 4.1 old", "ios 4.2 old", "ios 4.3 old", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 4 old", "safari 5 old", "safari 5.1", "safari 6"]
},
"repeating-linear-gradient": {
props: ["background", "background-image", "border-image"],
mistakes: ["-ms-"],
browsers: ["android 2.1 old", "android 2.2 old", "android 2.3 old", "android 3 old", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2 old", "ios 4 old", "ios 4.1 old", "ios 4.2 old", "ios 4.3 old", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 4 old", "safari 5 old", "safari 5.1", "safari 6"]
},
"repeating-radial-gradient": {
props: ["background", "background-image", "border-image"],
mistakes: ["-ms-"],
browsers: ["android 2.1 old", "android 2.2 old", "android 2.3 old", "android 3 old", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2 old", "ios 4 old", "ios 4.1 old", "ios 4.2 old", "ios 4.3 old", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 4 old", "safari 5 old", "safari 5.1", "safari 6"]
},
sticky: {
props: ["position"],
browsers: ["ios 6", "ios 6.1", "ios 7", "safari 6.1", "safari 7"]
},
"tab-size": {
browsers: ["ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 12.1"]
},
transform: {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ie 9", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"],
transition: true
},
"transform-origin": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ie 9", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"],
transition: true
},
"transform-style": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ie 9", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
transition: {
mistakes: ["-ms-"],
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6"]
},
"transition-delay": {
mistakes: ["-ms-"],
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6"]
},
"transition-duration": {
mistakes: ["-ms-"],
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6"]
},
"transition-property": {
mistakes: ["-ms-"],
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6"]
},
"transition-timing-function": {
mistakes: ["-ms-"],
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "bb 7", "bb 10", "chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "opera 10.5", "opera 10.6", "opera 11", "opera 11.1", "opera 11.5", "opera 11.6", "opera 12", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6"]
},
"user-select": {
browsers: ["android 2.1", "android 2.2", "android 2.3", "android 3", "android 4", "android 4.1", "android 4.2", "android 4.3", "android 4.4", "bb 7", "bb 10", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "ff 24", "ff 25", "ff 26", "ff 27", "ff 28", "ff 29", "ff 30", "ie 10", "ie 11", "ios 3.2", "ios 4", "ios 4.1", "ios 4.2", "ios 4.3", "ios 5", "ios 5.1", "ios 6", "ios 6.1", "ios 7", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"zoom-in": {
props: ["cursor"],
browsers: ["chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
},
"zoom-out": {
props: ["cursor"],
browsers: ["chrome 4", "chrome 5", "chrome 6", "chrome 7", "chrome 8", "chrome 9", "chrome 10", "chrome 11", "chrome 12", "chrome 13", "chrome 14", "chrome 15", "chrome 16", "chrome 17", "chrome 18", "chrome 19", "chrome 20", "chrome 21", "chrome 22", "chrome 23", "chrome 24", "chrome 25", "chrome 26", "chrome 27", "chrome 28", "chrome 29", "chrome 30", "chrome 31", "chrome 32", "chrome 33", "chrome 34", "chrome 35", "ff 2", "ff 3", "ff 3.5", "ff 3.6", "ff 4", "ff 5", "ff 6", "ff 7", "ff 8", "ff 9", "ff 10", "ff 11", "ff 12", "ff 13", "ff 14", "ff 15", "ff 16", "ff 17", "ff 18", "ff 19", "ff 20", "ff 21", "ff 22", "ff 23", "opera 15", "opera 16", "opera 17", "opera 18", "opera 19", "opera 20", "opera 21", "safari 3.1", "safari 3.2", "safari 4", "safari 5", "safari 5.1", "safari 6", "safari 6.1", "safari 7"]
}
};
}).call(this);
@@ -0,0 +1,117 @@
(function() {
var Autoprefixer, Browsers, Prefixes, autoprefixer, infoCache, postcss,
__slice = [].slice,
__bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; };
postcss = require('postcss');
Browsers = require('./browsers');
Prefixes = require('./prefixes');
infoCache = null;
autoprefixer = function() {
var browsers, prefixes, reqs;
reqs = 1 <= arguments.length ? __slice.call(arguments, 0) : [];
if (reqs.length === 1 && reqs[0] instanceof Array) {
reqs = reqs[0];
} else if (reqs.length === 0 || (reqs.length === 1 && (reqs[0] == null))) {
reqs = void 0;
}
if (reqs == null) {
reqs = autoprefixer["default"];
}
browsers = new Browsers(autoprefixer.data.browsers, reqs);
prefixes = new Prefixes(autoprefixer.data.prefixes, browsers);
return new Autoprefixer(prefixes, autoprefixer.data);
};
autoprefixer.data = {
browsers: require('../data/browsers'),
prefixes: require('../data/prefixes')
};
Autoprefixer = (function() {
function Autoprefixer(prefixes, data) {
this.prefixes = prefixes;
this.data = data;
this.postcss = __bind(this.postcss, this);
this.browsers = this.prefixes.browsers.selected;
}
Autoprefixer.prototype.process = function(str, options) {
if (options == null) {
options = {};
}
return this.processor().process(str, options);
};
Autoprefixer.prototype.compile = function(str, options) {
var fixed, name, value;
if (options == null) {
options = {};
}
fixed = {};
for (name in options) {
value = options[name];
if (name === 'file') {
name = 'from';
}
fixed[name] = value;
}
if (typeof console !== "undefined" && console !== null) {
console.warn('autoprefixer: replace compile() to process(). ' + 'Method compile() is deprecated and will be removed in 1.1.');
}
return this.process(str, fixed).css;
};
Autoprefixer.prototype.postcss = function(css) {
this.prefixes.processor.remove(css);
return this.prefixes.processor.add(css);
};
Autoprefixer.prototype.info = function() {
infoCache || (infoCache = require('./info'));
return infoCache(this.prefixes);
};
Autoprefixer.prototype.processor = function() {
return this.processorCache || (this.processorCache = postcss(this.postcss));
};
return Autoprefixer;
})();
autoprefixer["default"] = ['> 1%', 'last 2 versions', 'Firefox ESR', 'Opera 12.1'];
autoprefixer.loadDefault = function() {
return this.defaultCache || (this.defaultCache = autoprefixer(this["default"]));
};
autoprefixer.process = function(str, options) {
if (options == null) {
options = {};
}
return this.loadDefault().process(str, options);
};
autoprefixer.compile = function(str, options) {
if (options == null) {
options = {};
}
return this.loadDefault().compile(str, options);
};
autoprefixer.postcss = function(css) {
return this.loadDefault().postcss(css);
};
autoprefixer.info = function() {
return this.loadDefault().info();
};
module.exports = autoprefixer;
}).call(this);
+326
View File
@@ -0,0 +1,326 @@
(function() {
var Binary, autoprefixer, fs, path;
autoprefixer = require('./autoprefixer');
path = require('path');
fs = require('fs-extra');
Binary = (function() {
function Binary(process) {
this["arguments"] = process.argv.slice(2);
this.stdin = process.stdin;
this.stderr = process.stderr;
this.stdout = process.stdout;
this.status = 0;
this.command = 'compile';
this.inputFiles = [];
this.parseArguments();
}
Binary.prototype.help = function() {
return 'Usage: autoprefixer [OPTION...] FILES\n\nParse CSS files and add prefixed properties and values.\n\nOptions:\n -b, --browsers BROWSERS add prefixes for selected browsers\n -o, --output FILE set output file\n -d, --dir DIR set output dir\n -m, --map generate source map\n -i, --info show selected browsers and properties\n -h, --help show help text\n -v, --version print program version';
};
Binary.prototype.desc = function() {
return 'Files:\n If you didn\'t set input files, autoprefixer will read from stdin stream.\n\n By default, prefixed CSS will rewrite original files.\n\n You can specify output file or directory by `-o` argument.\n For several input files you can specify only output directory by `-d`.\n\n Output CSS will be written to stdout stream on `-o -\' argument or stdin input.\n\nSource maps:\n On `-m` argument Autoprefixer will generate source map for changes near\n output CSS (for out/main.css it generates out/main.css.map).\n\n If previous source map will be near input files (for example, in/main.css\n and in/main.css.map) Autoprefixer will apply previous map to output\n source map.\n\nBrowsers:\n Separate browsers by comma. For example, `-b "> 1%, opera 12"\'.\n You can set browsers by global usage statictics: `-b \"> 1%\"\'.\n or last version: `-b "last 2 versions"\'.';
};
Binary.prototype.print = function(str) {
str = str.replace(/\n$/, '');
return this.stdout.write(str + "\n");
};
Binary.prototype.error = function(str) {
this.status = 1;
return this.stderr.write(str + "\n");
};
Binary.prototype.version = function() {
return require('../package.json').version;
};
Binary.prototype.parseArguments = function() {
var arg, args;
args = this["arguments"].slice();
while (args.length > 0) {
arg = args.shift();
switch (arg) {
case '-h':
case '--help':
this.command = 'showHelp';
break;
case '-v':
case '--version':
this.command = 'showVersion';
break;
case '-i':
case '--info':
this.command = 'info';
break;
case '-u':
case '--update':
this.command = 'update';
break;
case '-m':
case '--map':
this.sourceMap = true;
break;
case '-b':
case '--browsers':
this.requirements = args.shift().split(',').map(function(i) {
return i.trim();
});
break;
case '-o':
case '--output':
this.outputFile = args.shift();
break;
case '-d':
case '--dir':
this.outputDir = args.shift();
break;
default:
if (arg.match(/^-\w$/) || arg.match(/^--\w[\w-]+$/)) {
this.command = void 0;
this.error("autoprefixer: Unknown argument " + arg);
this.error('');
this.error(this.help());
} else {
this.inputFiles.push(arg);
}
}
}
};
Binary.prototype.showHelp = function(done) {
this.print(this.help());
this.print('');
this.print(this.desc());
return done();
};
Binary.prototype.showVersion = function(done) {
this.print("autoprefixer " + (this.version()));
return done();
};
Binary.prototype.info = function(done) {
this.print(this.compiler().info());
return done();
};
Binary.prototype.update = function(done) {
var coffee, updater;
try {
coffee = require('coffee-script');
} catch (_error) {
this.error("Install coffee-script npm package");
return done();
}
updater = require('./updater');
updater.request((function(_this) {
return function() {
return _this.stdout.write('.');
};
})(this));
updater.done((function(_this) {
return function() {
_this.print('');
if (updater.changed.length === 0) {
_this.print('Everything up-to-date');
} else {
_this.print("Update " + (updater.changed.join(' and ')) + " data");
}
return done();
};
})(this));
return updater.run();
};
Binary.prototype.startWork = function() {
return this.waiting += 1;
};
Binary.prototype.endWork = function() {
this.waiting -= 1;
if (this.waiting <= 0) {
return this.doneCallback();
}
};
Binary.prototype.workError = function(str) {
this.error(str);
return this.endWork();
};
Binary.prototype.compiler = function() {
return this.compilerCache || (this.compilerCache = autoprefixer(this.requirements));
};
Binary.prototype.compileCSS = function(css, output, input) {
var error, opts, result;
opts = {};
if (input) {
opts.from = input;
}
if (output !== '-') {
opts.to = output;
}
if (this.sourceMap) {
opts.map = true;
}
if (opts.map && input && fs.existsSync(input + '.map')) {
opts.map = fs.readFileSync(input + '.map').toString();
}
try {
result = this.compiler().process(css, opts);
} catch (_error) {
error = _error;
if (error.autoprefixer || error.message.match(/^Can't parse CSS/)) {
this.error("autoprefixer: " + error.message);
} else {
this.error('autoprefixer: Internal error');
}
if (error.css || !error.autoprefixer) {
if (error.stack != null) {
this.error('');
this.error(error.stack);
}
}
}
if (result == null) {
return this.endWork();
}
if (output === '-') {
this.print(result.css);
return this.endWork();
} else {
return fs.outputFile(output, result.css, (function(_this) {
return function(error) {
if (error) {
_this.error("autoprefixer: " + error);
}
if (result.map) {
return fs.writeFile(output + '.map', result.map, function(error) {
if (error) {
_this.error("autoprefixer: " + error);
}
return _this.endWork();
});
} else {
return _this.endWork();
}
};
})(this));
}
};
Binary.prototype.files = function() {
var file, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _results, _results1, _results2;
if (this.inputFiles.length === 0) {
this.outputFile || (this.outputFile = '-');
}
if (this.outputDir) {
if (this.inputFiles.length === 0) {
this.error("autoprefixer: For STDIN input you need to specify output file (by `-o FILE`),\nnot output dir");
return;
}
if (fs.existsSync(this.outputDir) && !fs.statSync(this.outputDir).isDirectory()) {
this.error("autoprefixer: Path " + this.outputDir + " is a file, not directory");
return;
}
_ref = this.inputFiles;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
file = _ref[_i];
_results.push([file, path.join(this.outputDir, path.basename(file))]);
}
return _results;
} else if (this.outputFile) {
if (this.inputFiles.length > 1) {
this.error("autoprefixer: For several files you can specify only output dir (by `-d DIR`),\nnot one output file");
return;
}
_ref1 = this.inputFiles;
_results1 = [];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
file = _ref1[_j];
_results1.push([file, this.outputFile]);
}
return _results1;
} else {
_ref2 = this.inputFiles;
_results2 = [];
for (_k = 0, _len2 = _ref2.length; _k < _len2; _k++) {
file = _ref2[_k];
_results2.push([file, file]);
}
return _results2;
}
};
Binary.prototype.compile = function(done) {
var css, file, files, input, output, _fn, _i, _j, _len, _len1, _ref;
this.waiting = 0;
this.doneCallback = done;
files = this.files();
if (!files) {
return done();
}
if (files.length === 0) {
this.startWork();
css = '';
this.stdin.resume();
this.stdin.on('data', function(chunk) {
return css += chunk;
});
return this.stdin.on('end', (function(_this) {
return function() {
return _this.compileCSS(css, _this.outputFile);
};
})(this));
} else {
for (_i = 0, _len = files.length; _i < _len; _i++) {
file = files[_i];
this.startWork();
}
_fn = (function(_this) {
return function(input, output) {
return fs.readFile(input, function(error, css) {
if (error) {
return _this.workError("autoprefixer: " + error.message);
} else {
return _this.compileCSS(css, output, input);
}
});
};
})(this);
for (_j = 0, _len1 = files.length; _j < _len1; _j++) {
_ref = files[_j], input = _ref[0], output = _ref[1];
if (!fs.existsSync(input)) {
this.workError("autoprefixer: File " + input + " doesn't exists");
continue;
}
_fn(input, output);
}
return false;
}
};
Binary.prototype.run = function(done) {
if (this.command) {
return this[this.command](done);
} else {
return done();
}
};
return Binary;
})();
module.exports = Binary;
}).call(this);
@@ -0,0 +1,190 @@
(function() {
var Browsers, utils;
utils = require('./utils');
Browsers = (function() {
Browsers.prefixes = function() {
var data, i, name;
if (this.prefixesCache) {
return this.prefixesCache;
}
data = require('../data/browsers');
return this.prefixesCache = utils.uniq((function() {
var _results;
_results = [];
for (name in data) {
i = data[name];
_results.push(i.prefix);
}
return _results;
})()).sort(function(a, b) {
return b.length - a.length;
});
};
function Browsers(data, requirements) {
this.data = data;
this.selected = this.parse(requirements);
}
Browsers.prototype.parse = function(requirements) {
var selected;
if (!(requirements instanceof Array)) {
requirements = [requirements];
}
selected = [];
requirements.map((function(_this) {
return function(req) {
var i, match, name, _ref;
_ref = _this.requirements;
for (name in _ref) {
i = _ref[name];
if (match = req.match(i.regexp)) {
selected = selected.concat(i.select.apply(_this, match.slice(1)));
return;
}
}
return utils.error("Unknown browser requirement `" + req + "`");
};
})(this));
return utils.uniq(selected);
};
Browsers.prototype.aliases = {
fx: 'ff',
firefox: 'ff',
explorer: 'ie',
blackberry: 'bb'
};
Browsers.prototype.requirements = {
none: {
regexp: /^none$/i,
select: function() {
return [];
}
},
lastVersions: {
regexp: /^last (\d+) versions?$/i,
select: function(versions) {
return this.browsers(function(data) {
if (data.minor) {
return [];
} else {
return data.versions.slice(0, versions);
}
});
}
},
lastByBrowser: {
regexp: /^last (\d+) (\w+) versions?$/i,
select: function(versions, browser) {
var data;
data = this.byName(browser);
return data.versions.slice(0, versions).map(function(v) {
return "" + data.name + " " + v;
});
}
},
globalStatistics: {
regexp: /^> (\d+(\.\d+)?)%$/,
select: function(popularity) {
return this.browsers(function(data) {
return data.versions.filter(function(version, i) {
return data.popularity[i] > popularity;
});
});
}
},
newerThen: {
regexp: /^(\w+) (>=?)\s*([\d\.]+)/,
select: function(browser, sign, version) {
var data, filter;
data = this.byName(browser);
version = parseFloat(version);
if (sign === '>') {
filter = function(v) {
return v > version;
};
} else if (sign === '>=') {
filter = function(v) {
return v >= version;
};
}
return data.versions.filter(filter).map(function(v) {
return "" + data.name + " " + v;
});
}
},
esr: {
regexp: /^(firefox|ff|fx) esr$/i,
select: function() {
return ['ff 24'];
}
},
direct: {
regexp: /^(\w+) ([\d\.]+)$/,
select: function(browser, version) {
var data, first, last;
data = this.byName(browser);
version = parseFloat(version);
last = data.future ? data.future[0] : data.versions[0];
first = data.versions[data.versions.length - 1];
if (version > last) {
version = last;
} else if (version < first) {
version = first;
}
return ["" + data.name + " " + version];
}
}
};
Browsers.prototype.browsers = function(criteria) {
var browser, data, selected, versions, _ref;
selected = [];
_ref = this.data;
for (browser in _ref) {
data = _ref[browser];
versions = criteria(data).map(function(version) {
return "" + browser + " " + version;
});
selected = selected.concat(versions);
}
return selected;
};
Browsers.prototype.prefix = function(browser) {
var name, version, _ref;
_ref = browser.split(' '), name = _ref[0], version = _ref[1];
if (name === 'opera' && parseFloat(version) >= 15) {
return '-webkit-';
} else {
return this.data[name].prefix;
}
};
Browsers.prototype.isSelected = function(browser) {
return this.selected.indexOf(browser) !== -1;
};
Browsers.prototype.byName = function(name) {
var data;
name = name.toLowerCase();
name = this.aliases[name] || name;
data = this.data[name];
if (!data) {
utils.error("Unknown browser " + browser);
}
data.name = name;
return data;
};
return Browsers;
})();
module.exports = Browsers;
}).call(this);
@@ -0,0 +1,81 @@
(function() {
var Browsers, Declaration, Prefixer, vendor,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Prefixer = require('./prefixer');
Browsers = require('./browsers');
vendor = require('postcss/lib/vendor');
Declaration = (function(_super) {
__extends(Declaration, _super);
function Declaration() {
return Declaration.__super__.constructor.apply(this, arguments);
}
Declaration.prototype.check = function(decl) {
return true;
};
Declaration.prototype.prefixed = function(prop, prefix) {
return prefix + prop;
};
Declaration.prototype.normalize = function(prop) {
return prop;
};
Declaration.prototype.otherPrefixes = function(value, prefix) {
var other, _i, _len, _ref;
_ref = Browsers.prefixes();
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
other = _ref[_i];
if (other === prefix) {
continue;
}
if (value.indexOf(other) !== -1) {
return true;
}
}
return false;
};
Declaration.prototype.set = function(decl, prefix) {
decl.prop = this.prefixed(decl.prop, prefix);
return decl;
};
Declaration.prototype.insert = function(decl, prefix) {
var cloned;
cloned = this.set(this.clone(decl), prefix);
if (cloned) {
return decl.parent.insertBefore(decl, cloned);
}
};
Declaration.prototype.add = function(decl, prefix) {
var already, prefixed;
prefixed = this.prefixed(decl.prop, prefix);
already = this.all.group(decl).up(function(i) {
return i.prop === prefixed;
});
if (already || this.otherPrefixes(decl.value, prefix)) {
return;
}
return this.insert(decl, prefix);
};
Declaration.prototype.old = function(prop, prefix) {
return [this.prefixed(prop, prefix)];
};
return Declaration;
})(Prefixer);
module.exports = Declaration;
}).call(this);
@@ -0,0 +1,57 @@
(function() {
var AlignContent, Declaration, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
AlignContent = (function(_super) {
__extends(AlignContent, _super);
function AlignContent() {
return AlignContent.__super__.constructor.apply(this, arguments);
}
AlignContent.names = ['align-content', 'flex-line-pack'];
AlignContent.oldValues = {
'flex-end': 'end',
'flex-start': 'start',
'space-between': 'justify',
'space-around': 'distribute'
};
AlignContent.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return prefix + 'flex-line-pack';
} else {
return AlignContent.__super__.prefixed.apply(this, arguments);
}
};
AlignContent.prototype.normalize = function(prop) {
return 'align-content';
};
AlignContent.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2012) {
decl.value = AlignContent.oldValues[decl.value] || decl.value;
return AlignContent.__super__.set.call(this, decl, prefix);
} else if (spec === 'final') {
return AlignContent.__super__.set.apply(this, arguments);
}
};
return AlignContent;
})(Declaration);
module.exports = AlignContent;
}).call(this);
@@ -0,0 +1,57 @@
(function() {
var AlignItems, Declaration, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
AlignItems = (function(_super) {
__extends(AlignItems, _super);
function AlignItems() {
return AlignItems.__super__.constructor.apply(this, arguments);
}
AlignItems.names = ['align-items', 'flex-align', 'box-align'];
AlignItems.oldValues = {
'flex-end': 'end',
'flex-start': 'start'
};
AlignItems.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return prefix + 'box-align';
} else if (spec === 2012) {
return prefix + 'flex-align';
} else {
return AlignItems.__super__.prefixed.apply(this, arguments);
}
};
AlignItems.prototype.normalize = function(prop) {
return 'align-items';
};
AlignItems.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2009 || spec === 2012) {
decl.value = AlignItems.oldValues[decl.value] || decl.value;
return AlignItems.__super__.set.call(this, decl, prefix);
} else {
return AlignItems.__super__.set.apply(this, arguments);
}
};
return AlignItems;
})(Declaration);
module.exports = AlignItems;
}).call(this);
@@ -0,0 +1,55 @@
(function() {
var AlignSelf, Declaration, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
AlignSelf = (function(_super) {
__extends(AlignSelf, _super);
function AlignSelf() {
return AlignSelf.__super__.constructor.apply(this, arguments);
}
AlignSelf.names = ['align-self', 'flex-item-align'];
AlignSelf.oldValues = {
'flex-end': 'end',
'flex-start': 'start'
};
AlignSelf.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return prefix + 'flex-item-align';
} else {
return AlignSelf.__super__.prefixed.apply(this, arguments);
}
};
AlignSelf.prototype.normalize = function(prop) {
return 'align-self';
};
AlignSelf.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2012) {
decl.value = AlignSelf.oldValues[decl.value] || decl.value;
return AlignSelf.__super__.set.call(this, decl, prefix);
} else if (spec === 'final') {
return AlignSelf.__super__.set.apply(this, arguments);
}
};
return AlignSelf;
})(Declaration);
module.exports = AlignSelf;
}).call(this);
@@ -0,0 +1,28 @@
(function() {
var BorderImage, Declaration,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
BorderImage = (function(_super) {
__extends(BorderImage, _super);
function BorderImage() {
return BorderImage.__super__.constructor.apply(this, arguments);
}
BorderImage.names = ['border-image'];
BorderImage.prototype.set = function(decl, prefix) {
decl.value = decl.value.replace(/\s+fill(\s)/, '$1');
return BorderImage.__super__.set.call(this, decl, prefix);
};
return BorderImage;
})(Declaration);
module.exports = BorderImage;
}).call(this);
@@ -0,0 +1,56 @@
(function() {
var BorderRadius, Declaration,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
BorderRadius = (function(_super) {
var hor, mozilla, normal, ver, _i, _j, _len, _len1, _ref, _ref1;
__extends(BorderRadius, _super);
function BorderRadius() {
return BorderRadius.__super__.constructor.apply(this, arguments);
}
BorderRadius.names = ['border-radius'];
BorderRadius.toMozilla = {};
BorderRadius.toNormal = {};
_ref = ['top', 'bottom'];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
ver = _ref[_i];
_ref1 = ['left', 'right'];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
hor = _ref1[_j];
normal = "border-" + ver + "-" + hor + "-radius";
mozilla = "border-radius-" + ver + hor;
BorderRadius.names.push(normal);
BorderRadius.names.push(mozilla);
BorderRadius.toMozilla[normal] = mozilla;
BorderRadius.toNormal[mozilla] = normal;
}
}
BorderRadius.prototype.prefixed = function(prop, prefix) {
if (prefix === '-moz-') {
return prefix + (BorderRadius.toMozilla[prop] || prop);
} else {
return BorderRadius.__super__.prefixed.apply(this, arguments);
}
};
BorderRadius.prototype.normalize = function(prop) {
return BorderRadius.toNormal[prop] || prop;
};
return BorderRadius;
})(Declaration);
module.exports = BorderRadius;
}).call(this);
@@ -0,0 +1,70 @@
(function() {
var DisplayFlex, OldDisplayFlex, OldValue, Value, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
OldValue = require('../old-value');
Value = require('../value');
OldDisplayFlex = (function(_super) {
__extends(OldDisplayFlex, _super);
function OldDisplayFlex(name) {
this.name = name;
}
OldDisplayFlex.prototype.check = function(value) {
return value === this.name;
};
return OldDisplayFlex;
})(OldValue);
DisplayFlex = (function(_super) {
__extends(DisplayFlex, _super);
DisplayFlex.names = ['display-flex', 'inline-flex'];
function DisplayFlex(name, prefixes) {
DisplayFlex.__super__.constructor.apply(this, arguments);
if (name === 'display-flex') {
this.name = 'flex';
}
}
DisplayFlex.prototype.check = function(decl) {
return decl.value === this.name;
};
DisplayFlex.prototype.prefixed = function(prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009 && this.name === 'inline-flex') {
return;
}
return prefix + (spec === 2009 ? 'box' : spec === 2012 ? this.name === 'flex' ? 'flexbox' : 'inline-flexbox' : spec === 'final' ? this.name : void 0);
};
DisplayFlex.prototype.replace = function(string, prefix) {
return this.prefixed(prefix);
};
DisplayFlex.prototype.old = function(prefix) {
var prefixed;
prefixed = this.prefixed(prefix);
if (prefixed) {
return new OldValue(prefixed);
}
};
return DisplayFlex;
})(Value);
module.exports = DisplayFlex;
}).call(this);
@@ -0,0 +1,41 @@
(function() {
var FillAvailable, OldValue, Value,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
OldValue = require('../old-value');
Value = require('../value');
FillAvailable = (function(_super) {
__extends(FillAvailable, _super);
function FillAvailable() {
return FillAvailable.__super__.constructor.apply(this, arguments);
}
FillAvailable.names = ['fill-available'];
FillAvailable.prototype.replace = function(string, prefix) {
if (prefix === '-moz-') {
return string.replace(this.regexp(), '$1-moz-available$3');
} else {
return FillAvailable.__super__.replace.apply(this, arguments);
}
};
FillAvailable.prototype.old = function(prefix) {
if (prefix === '-moz-') {
return new OldValue('-moz-available');
} else {
return FillAvailable.__super__.old.apply(this, arguments);
}
};
return FillAvailable;
})(Value);
module.exports = FillAvailable;
}).call(this);
@@ -0,0 +1,29 @@
(function() {
var Declaration, Filter,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Declaration = require('../declaration');
Filter = (function(_super) {
__extends(Filter, _super);
function Filter() {
return Filter.__super__.constructor.apply(this, arguments);
}
Filter.names = ['filter'];
Filter.prototype.check = function(decl) {
var v;
v = decl.value;
return v.toLowerCase().indexOf('alpha(') === -1 && v.indexOf('DXImageTransform.Microsoft') === -1;
};
return Filter;
})(Declaration);
module.exports = Filter;
}).call(this);
@@ -0,0 +1,51 @@
(function() {
var Declaration, FlexBasis, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
FlexBasis = (function(_super) {
__extends(FlexBasis, _super);
function FlexBasis() {
return FlexBasis.__super__.constructor.apply(this, arguments);
}
FlexBasis.names = ['flex-basis'];
FlexBasis.prototype.normalize = function() {
return 'flex';
};
FlexBasis.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return prefix + 'flex';
} else {
return FlexBasis.__super__.prefixed.apply(this, arguments);
}
};
FlexBasis.prototype.set = function(decl, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
decl.prop = prefix + 'flex';
decl.value = '0 1 ' + decl.value;
return decl;
} else if (spec === 'final') {
return FlexBasis.__super__.set.apply(this, arguments);
}
};
return FlexBasis;
})(Declaration);
module.exports = FlexBasis;
}).call(this);
@@ -0,0 +1,65 @@
(function() {
var Declaration, FlexDirection, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
FlexDirection = (function(_super) {
__extends(FlexDirection, _super);
function FlexDirection() {
return FlexDirection.__super__.constructor.apply(this, arguments);
}
FlexDirection.names = ['flex-direction', 'box-direction', 'box-orient'];
FlexDirection.prototype.normalize = function(prop) {
return 'flex-direction';
};
FlexDirection.prototype.insert = function(decl, prefix) {
var already, cloned, dir, orient, spec, value, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
already = decl.parent.some(function(i) {
return i.prop === prefix + 'box-orient' || i.prop === prefix + 'box-direction';
});
if (already) {
return;
}
value = decl.value;
orient = value.indexOf('row') !== -1 ? 'horizontal' : 'vertical';
dir = value.indexOf('reverse') !== -1 ? 'reverse' : 'normal';
cloned = this.clone(decl);
cloned.prop = prefix + 'box-orient';
cloned.value = orient;
decl.parent.insertBefore(decl, cloned);
cloned = this.clone(decl);
cloned.prop = prefix + 'box-direction';
cloned.value = dir;
return decl.parent.insertBefore(decl, cloned);
} else {
return FlexDirection.__super__.insert.apply(this, arguments);
}
};
FlexDirection.prototype.old = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return [prefix + 'box-orient', prefix + 'box-direction'];
} else {
return FlexDirection.__super__.old.apply(this, arguments);
}
};
return FlexDirection;
})(Declaration);
module.exports = FlexDirection;
}).call(this);
@@ -0,0 +1,35 @@
(function() {
var Declaration, FlexFlow, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
FlexFlow = (function(_super) {
__extends(FlexFlow, _super);
function FlexFlow() {
return FlexFlow.__super__.constructor.apply(this, arguments);
}
FlexFlow.names = ['flex-flow'];
FlexFlow.prototype.set = function(decl, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return FlexFlow.__super__.set.apply(this, arguments);
} else if (spec === 'final') {
return FlexFlow.__super__.set.apply(this, arguments);
}
};
return FlexFlow;
})(Declaration);
module.exports = FlexFlow;
}).call(this);
@@ -0,0 +1,41 @@
(function() {
var Declaration, Flex, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
Flex = (function(_super) {
__extends(Flex, _super);
function Flex() {
return Flex.__super__.constructor.apply(this, arguments);
}
Flex.names = ['flex-grow'];
Flex.prototype.normalize = function() {
return 'flex';
};
Flex.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return prefix + 'box-flex';
} else if (spec === 2012) {
return prefix + 'flex';
} else {
return Flex.__super__.prefixed.apply(this, arguments);
}
};
return Flex;
})(Declaration);
module.exports = Flex;
}).call(this);
@@ -0,0 +1,51 @@
(function() {
var Declaration, FlexShrink, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
FlexShrink = (function(_super) {
__extends(FlexShrink, _super);
function FlexShrink() {
return FlexShrink.__super__.constructor.apply(this, arguments);
}
FlexShrink.names = ['flex-shrink'];
FlexShrink.prototype.normalize = function() {
return 'flex';
};
FlexShrink.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
return prefix + 'flex';
} else {
return FlexShrink.__super__.prefixed.apply(this, arguments);
}
};
FlexShrink.prototype.set = function(decl, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2012) {
decl.prop = prefix + 'flex';
decl.value = '0 ' + decl.value;
return decl;
} else if (spec === 'final') {
return FlexShrink.__super__.set.apply(this, arguments);
}
};
return FlexShrink;
})(Declaration);
module.exports = FlexShrink;
}).call(this);
@@ -0,0 +1,11 @@
(function() {
module.exports = function(prefix) {
var spec;
spec = prefix === '-webkit- 2009' || prefix === '-moz-' ? 2009 : prefix === '-ms-' ? 2012 : prefix === '-webkit-' ? 'final' : void 0;
if (prefix === '-webkit- 2009') {
prefix = '-webkit-';
}
return [spec, prefix];
};
}).call(this);
@@ -0,0 +1,33 @@
(function() {
var Declaration, FlexWrap, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
FlexWrap = (function(_super) {
__extends(FlexWrap, _super);
function FlexWrap() {
return FlexWrap.__super__.constructor.apply(this, arguments);
}
FlexWrap.names = ['flex-wrap'];
FlexWrap.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec !== 2009) {
return FlexWrap.__super__.set.apply(this, arguments);
}
};
return FlexWrap;
})(Declaration);
module.exports = FlexWrap;
}).call(this);
@@ -0,0 +1,50 @@
(function() {
var Declaration, Flex, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
Flex = (function(_super) {
__extends(Flex, _super);
function Flex() {
return Flex.__super__.constructor.apply(this, arguments);
}
Flex.names = ['flex', 'box-flex'];
Flex.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return prefix + 'box-flex';
} else {
return Flex.__super__.prefixed.apply(this, arguments);
}
};
Flex.prototype.normalize = function(prop) {
return 'flex';
};
Flex.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2009) {
decl.value = decl.value.split(' ')[0];
return Flex.__super__.set.call(this, decl, prefix);
} else {
return Flex.__super__.set.apply(this, arguments);
}
};
return Flex;
})(Declaration);
module.exports = Flex;
}).call(this);
@@ -0,0 +1,33 @@
(function() {
var Fullscreen, Selector,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Selector = require('../selector');
Fullscreen = (function(_super) {
__extends(Fullscreen, _super);
function Fullscreen() {
return Fullscreen.__super__.constructor.apply(this, arguments);
}
Fullscreen.names = [':fullscreen'];
Fullscreen.prototype.prefixed = function(prefix) {
if ('-webkit-' === prefix) {
return ':-webkit-full-screen';
} else if ('-moz-' === prefix) {
return ':-moz-full-screen';
} else {
return ":" + prefix + "fullscreen";
}
};
return Fullscreen;
})(Selector);
module.exports = Fullscreen;
}).call(this);
@@ -0,0 +1,213 @@
(function() {
var Gradient, OldValue, Value, isDirection, list, utils,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
OldValue = require('../old-value');
Value = require('../value');
utils = require('../utils');
list = require('postcss/lib/list');
isDirection = /top|left|right|bottom/gi;
Gradient = (function(_super) {
__extends(Gradient, _super);
function Gradient() {
return Gradient.__super__.constructor.apply(this, arguments);
}
Gradient.names = ['linear-gradient', 'repeating-linear-gradient', 'radial-gradient', 'repeating-radial-gradient'];
Gradient.prototype.replace = function(string, prefix) {
var values;
values = list.comma(string).map((function(_this) {
return function(value) {
var after, args, close, params;
if (value.slice(0, +_this.name.length + 1 || 9e9) !== _this.name + '(') {
return value;
}
close = value.lastIndexOf(')');
after = value.slice(close + 1);
args = value.slice(_this.name.length + 1, +(close - 1) + 1 || 9e9);
params = list.comma(args);
params = _this.newDirection(params);
if (prefix === '-webkit- old') {
return _this.oldWebkit(value, args, params, after);
} else {
_this.convertDirection(params);
return prefix + _this.name + '(' + params.join(', ') + ')' + after;
}
};
})(this));
return values.join(', ');
};
Gradient.prototype.directions = {
top: 'bottom',
left: 'right',
bottom: 'top',
right: 'left'
};
Gradient.prototype.oldDirections = {
'top': 'left bottom, left top',
'left': 'right top, left top',
'bottom': 'left top, left bottom',
'right': 'left top, right top',
'top right': 'left bottom, right top',
'top left': 'right bottom, left top',
'bottom right': 'left top, right bottom',
'bottom left': 'right top, left bottom'
};
Gradient.prototype.newDirection = function(params) {
var first, value;
first = params[0];
if (first.indexOf('to ') === -1 && isDirection.test(first)) {
first = first.split(' ');
first = (function() {
var _i, _len, _results;
_results = [];
for (_i = 0, _len = first.length; _i < _len; _i++) {
value = first[_i];
_results.push(this.directions[value.toLowerCase()] || value);
}
return _results;
}).call(this);
params[0] = 'to ' + first.join(' ');
}
return params;
};
Gradient.prototype.oldWebkit = function(value, args, params, after) {
if (this.name !== 'linear-gradient') {
return value;
}
if (params[0] && params[0].indexOf('deg') !== -1) {
return value;
}
if (args.indexOf('-corner') !== -1) {
return value;
}
if (args.indexOf('-side') !== -1) {
return value;
}
params = this.oldDirection(params);
params = this.colorStops(params);
return '-webkit-gradient(linear, ' + params.join(', ') + ')' + after;
};
Gradient.prototype.convertDirection = function(params) {
if (params.length > 0) {
if (params[0].slice(0, 3) === 'to ') {
return params[0] = this.fixDirection(params[0]);
} else if (params[0].indexOf('deg') !== -1) {
return params[0] = this.fixAngle(params[0]);
} else if (params[0].indexOf(' at ') !== -1) {
return this.fixRadial(params);
}
}
};
Gradient.prototype.fixDirection = function(param) {
var value;
param = param.split(' ');
param.splice(0, 1);
param = (function() {
var _i, _len, _results;
_results = [];
for (_i = 0, _len = param.length; _i < _len; _i++) {
value = param[_i];
_results.push(this.directions[value.toLowerCase()] || value);
}
return _results;
}).call(this);
return param.join(' ');
};
Gradient.prototype.roundFloat = function(float, digits) {
return parseFloat(float.toFixed(digits));
};
Gradient.prototype.fixAngle = function(param) {
param = parseFloat(param);
param = Math.abs(450 - param) % 360;
param = this.roundFloat(param, 3);
return "" + param + "deg";
};
Gradient.prototype.oldDirection = function(params) {
var direction;
if (params.length === 0) {
params;
}
if (params[0].indexOf('to ') !== -1) {
direction = params[0].replace(/^to\s+/, '');
direction = this.oldDirections[direction];
params[0] = direction;
return params;
} else {
direction = this.oldDirections.bottom;
return [direction].concat(params);
}
};
Gradient.prototype.colorStops = function(params) {
return params.map(function(param, i) {
var color, position, separator;
if (i === 0) {
return param;
}
separator = param.lastIndexOf(' ');
if (separator === -1) {
color = param;
position = void 0;
} else {
color = param.slice(0, separator);
position = param.slice(separator + 1);
}
if (position && position.indexOf(')') !== -1) {
color += ' ' + position;
position = void 0;
}
if (i === 1) {
return "from(" + color + ")";
} else if (i === params.length - 1) {
return "to(" + color + ")";
} else if (position) {
return "color-stop(" + position + ", " + color + ")";
} else {
return "color-stop(" + color + ")";
}
});
};
Gradient.prototype.fixRadial = function(params) {
var first;
first = params[0].split(/\s+at\s+/);
return params.splice(0, 1, first[1], first[0]);
};
Gradient.prototype.old = function(prefix) {
var regexp, string, type;
if (prefix === '-webkit-') {
type = this.name === 'linear-gradient' ? 'linear' : 'radial';
string = '-gradient';
regexp = utils.regexp("-webkit-(" + type + "-gradient|gradient\\(\\s*" + type + ")", false);
return new OldValue(prefix + this.name, string, regexp);
} else {
return Gradient.__super__.old.apply(this, arguments);
}
};
return Gradient;
})(Value);
module.exports = Gradient;
}).call(this);
@@ -0,0 +1,62 @@
(function() {
var Declaration, JustifyContent, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
JustifyContent = (function(_super) {
__extends(JustifyContent, _super);
function JustifyContent() {
return JustifyContent.__super__.constructor.apply(this, arguments);
}
JustifyContent.names = ['justify-content', 'flex-pack', 'box-pack'];
JustifyContent.oldValues = {
'flex-end': 'end',
'flex-start': 'start',
'space-between': 'justify',
'space-around': 'distribute'
};
JustifyContent.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return prefix + 'box-pack';
} else if (spec === 2012) {
return prefix + 'flex-pack';
} else {
return JustifyContent.__super__.prefixed.apply(this, arguments);
}
};
JustifyContent.prototype.normalize = function(prop) {
return 'justify-content';
};
JustifyContent.prototype.set = function(decl, prefix) {
var spec, value;
spec = flexSpec(prefix)[0];
if (spec === 2009 || spec === 2012) {
value = JustifyContent.oldValues[decl.value] || decl.value;
decl.value = value;
if (spec !== 2009 || value !== 'distribute') {
return JustifyContent.__super__.set.call(this, decl, prefix);
}
} else if (spec === 'final') {
return JustifyContent.__super__.set.apply(this, arguments);
}
};
return JustifyContent;
})(Declaration);
module.exports = JustifyContent;
}).call(this);
@@ -0,0 +1,52 @@
(function() {
var Declaration, Order, flexSpec,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
flexSpec = require('./flex-spec');
Declaration = require('../declaration');
Order = (function(_super) {
__extends(Order, _super);
function Order() {
return Order.__super__.constructor.apply(this, arguments);
}
Order.names = ['order', 'flex-order', 'box-ordinal-group'];
Order.prototype.prefixed = function(prop, prefix) {
var spec, _ref;
_ref = flexSpec(prefix), spec = _ref[0], prefix = _ref[1];
if (spec === 2009) {
return prefix + 'box-ordinal-group';
} else if (spec === 2012) {
return prefix + 'flex-order';
} else {
return Order.__super__.prefixed.apply(this, arguments);
}
};
Order.prototype.normalize = function(prop) {
return 'order';
};
Order.prototype.set = function(decl, prefix) {
var spec;
spec = flexSpec(prefix)[0];
if (spec === 2009) {
decl.value = (parseInt(decl.value) + 1).toString();
return Order.__super__.set.call(this, decl, prefix);
} else {
return Order.__super__.set.apply(this, arguments);
}
};
return Order;
})(Declaration);
module.exports = Order;
}).call(this);
@@ -0,0 +1,35 @@
(function() {
var Placeholder, Selector,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Selector = require('../selector');
Placeholder = (function(_super) {
__extends(Placeholder, _super);
function Placeholder() {
return Placeholder.__super__.constructor.apply(this, arguments);
}
Placeholder.names = ['::placeholder'];
Placeholder.prototype.prefixed = function(prefix) {
if ('-webkit-' === prefix) {
return '::-webkit-input-placeholder';
} else if ('-ms-' === prefix) {
return ':-ms-input-placeholder';
} else if ('-moz- old' === prefix) {
return ':-moz-placeholder';
} else {
return "::" + prefix + "placeholder";
}
};
return Placeholder;
})(Selector);
module.exports = Placeholder;
}).call(this);
@@ -0,0 +1,31 @@
(function() {
var Transform, Value,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Value = require('../value');
Transform = (function(_super) {
__extends(Transform, _super);
function Transform() {
return Transform.__super__.constructor.apply(this, arguments);
}
Transform.names = ['transform'];
Transform.prototype.replace = function(value, prefix) {
if (prefix === '-ms-') {
return value;
} else {
return Transform.__super__.replace.apply(this, arguments);
}
};
return Transform;
})(Value);
module.exports = Transform;
}).call(this);
@@ -0,0 +1,37 @@
(function() {
var OldValue, Transition, Value,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
OldValue = require('../old-value');
Value = require('../value');
Transition = (function(_super) {
__extends(Transition, _super);
function Transition() {
return Transition.__super__.constructor.apply(this, arguments);
}
Transition.names = ['flex', 'flex-grow', 'flex-shrink', 'flex-basis'];
Transition.prototype.prefixed = function(prefix) {
return this.all.prefixed(this.name, prefix);
};
Transition.prototype.replace = function(string, prefix) {
return string.replace(this.regexp(), '$1' + this.prefixed(prefix) + '$3');
};
Transition.prototype.old = function(prefix) {
return new OldValue(this.prefixed(prefix));
};
return Transition;
})(Value);
module.exports = Transition;
}).call(this);
+114
View File
@@ -0,0 +1,114 @@
(function() {
var capitalize, names, prefix;
capitalize = function(str) {
return str.slice(0, 1).toUpperCase() + str.slice(1);
};
names = {
ie: 'IE',
ff: 'Firefox',
ios: 'iOS'
};
prefix = function(name, transition, prefixes) {
var out;
out = ' ' + name + (transition ? '*' : '') + ': ';
out += prefixes.map(function(i) {
return i.replace(/^-(.*)-$/g, '$1');
}).join(', ');
out += "\n";
return out;
};
module.exports = function(prefixes) {
var atrules, browser, data, list, name, needTransition, out, props, selector, selectors, string, transitionProp, useTransition, value, values, version, versions, _i, _j, _k, _len, _len1, _len2, _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6;
if (prefixes.browsers.selected.length === 0) {
return "No browsers selected";
}
versions = [];
_ref = prefixes.browsers.selected;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
browser = _ref[_i];
_ref1 = browser.split(' '), name = _ref1[0], version = _ref1[1];
name = names[name] || capitalize(name);
if (versions[name]) {
versions[name].push(version);
} else {
versions[name] = [version];
}
}
out = "Browsers:\n";
for (browser in versions) {
list = versions[browser];
list = list.sort(function(a, b) {
return parseFloat(b) - parseFloat(a);
});
out += ' ' + browser + ': ' + list.join(', ') + "\n";
}
atrules = '';
_ref2 = prefixes.add;
for (name in _ref2) {
data = _ref2[name];
if (name[0] === '@' && data.prefixes) {
atrules += prefix(name, false, data.prefixes);
}
}
if (atrules !== '') {
out += "\nAt-Rules:\n" + atrules;
}
selectors = '';
_ref3 = prefixes.add.selectors;
for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) {
selector = _ref3[_j];
if (selector.prefixes) {
selectors += prefix(selector.name, false, selector.prefixes);
}
}
if (selectors !== '') {
out += "\nSelectors:\n" + selectors;
}
values = '';
props = '';
useTransition = false;
needTransition = (_ref4 = prefixes.add.transition) != null ? _ref4.prefixes : void 0;
_ref5 = prefixes.add;
for (name in _ref5) {
data = _ref5[name];
if (name[0] !== '@' && data.prefixes) {
transitionProp = needTransition && prefixes.data[name].transition;
if (transitionProp) {
useTransition = true;
}
props += prefix(name, transitionProp, data.prefixes);
}
if (!data.values) {
continue;
}
if (prefixes.transitionProps.some(function(i) {
return i === name;
})) {
continue;
}
_ref6 = data.values;
for (_k = 0, _len2 = _ref6.length; _k < _len2; _k++) {
value = _ref6[_k];
string = prefix(value.name, false, value.prefixes);
if (values.indexOf(string) === -1) {
values += string;
}
}
}
if (useTransition) {
props += " * - can be used in transition\n";
}
if (props !== '') {
out += "\nProperties:\n" + props;
}
if (values !== '') {
out += "\nValues:\n" + values;
}
return out;
};
}).call(this);
@@ -0,0 +1,40 @@
(function() {
var Keyframes, Prefixer,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Prefixer = require('./prefixer');
Keyframes = (function(_super) {
__extends(Keyframes, _super);
function Keyframes() {
return Keyframes.__super__.constructor.apply(this, arguments);
}
Keyframes.prototype.check = function(atRule) {
return atRule.name === 'keyframes';
};
Keyframes.prototype.add = function(atRule, prefix) {
var already, cloned, prefixed;
prefixed = prefix + atRule.name;
already = atRule.parent.some(function(i) {
return i.name === prefixed && i.params === atRule.params;
});
if (already) {
return;
}
cloned = this.clone(atRule, {
name: prefixed
});
return atRule.parent.insertBefore(atRule, cloned);
};
return Keyframes;
})(Prefixer);
module.exports = Keyframes;
}).call(this);
@@ -0,0 +1,29 @@
(function() {
var OldValue, utils;
utils = require('./utils');
OldValue = (function() {
function OldValue(name, string, regexp) {
this.name = name;
this.string = string;
this.regexp = regexp;
this.regexp || (this.regexp = utils.regexp(this.name));
this.string || (this.string = this.name);
}
OldValue.prototype.check = function(value) {
if (value.indexOf(this.string) !== -1) {
return !!value.match(this.regexp);
} else {
return false;
}
};
return OldValue;
})();
module.exports = OldValue;
}).call(this);
@@ -0,0 +1,84 @@
(function() {
var Browsers, Prefixer, utils, vendor;
Browsers = require('./browsers');
vendor = require('postcss/lib/vendor');
utils = require('./utils');
Prefixer = (function() {
Prefixer.hack = function(klass) {
var name, _i, _len, _ref, _results;
this.hacks || (this.hacks = {});
_ref = klass.names;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
name = _ref[_i];
_results.push(this.hacks[name] = klass);
}
return _results;
};
Prefixer.load = function(name, prefixes, all) {
var klass, _ref;
klass = (_ref = this.hacks) != null ? _ref[name] : void 0;
if (klass) {
return new klass(name, prefixes, all);
} else {
return new this(name, prefixes, all);
}
};
Prefixer.clone = function(node, overrides) {
var cloned;
cloned = node.clone(overrides);
delete cloned._autoprefixerPrefix;
delete cloned._autoprefixerValues;
return cloned;
};
function Prefixer(name, prefixes, all) {
this.name = name;
this.prefixes = prefixes;
this.all = all;
}
Prefixer.prototype.parentPrefix = function(node) {
var prefix;
prefix = node._autoprefixerPrefix != null ? node._autoprefixerPrefix : node.type === 'decl' && node.prop[0] === '-' ? vendor.prefix(node.prop) : node.type === 'root' ? false : node.type === 'rule' && node.selector.indexOf(':-') !== -1 ? node.selector.match(/:(-\w+-)/)[1] : node.type === 'atrule' && node.name[0] === '-' ? vendor.prefix(node.name) : this.parentPrefix(node.parent);
if (Browsers.prefixes().indexOf(prefix) === -1) {
prefix = false;
}
return node._autoprefixerPrefix = prefix;
};
Prefixer.prototype.process = function(node) {
var parent, prefix, _i, _len, _ref, _results;
if (!this.check(node)) {
return;
}
parent = this.parentPrefix(node);
_ref = this.prefixes;
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
prefix = _ref[_i];
if (parent && parent !== utils.removeNote(prefix)) {
continue;
}
_results.push(this.add(node, prefix));
}
return _results;
};
Prefixer.prototype.clone = function(node, overrides) {
return Prefixer.clone(node, overrides);
};
return Prefixer;
})();
module.exports = Prefixer;
}).call(this);
@@ -0,0 +1,315 @@
(function() {
var Declaration, Keyframes, Prefixes, Processor, Selector, Value, declsCache, utils, vendor;
utils = require('./utils');
vendor = require('postcss/lib/vendor');
Processor = require('./processor');
Declaration = require('./declaration');
Keyframes = require('./keyframes');
Selector = require('./selector');
Value = require('./value');
Selector.hack(require('./hacks/fullscreen'));
Selector.hack(require('./hacks/placeholder'));
Declaration.hack(require('./hacks/flex'));
Declaration.hack(require('./hacks/order'));
Declaration.hack(require('./hacks/filter'));
Declaration.hack(require('./hacks/flex-flow'));
Declaration.hack(require('./hacks/flex-grow'));
Declaration.hack(require('./hacks/flex-wrap'));
Declaration.hack(require('./hacks/align-self'));
Declaration.hack(require('./hacks/flex-basis'));
Declaration.hack(require('./hacks/align-items'));
Declaration.hack(require('./hacks/flex-shrink'));
Declaration.hack(require('./hacks/border-image'));
Declaration.hack(require('./hacks/align-content'));
Declaration.hack(require('./hacks/border-radius'));
Declaration.hack(require('./hacks/flex-direction'));
Declaration.hack(require('./hacks/justify-content'));
Value.hack(require('./hacks/gradient'));
Value.hack(require('./hacks/transform'));
Value.hack(require('./hacks/transition'));
Value.hack(require('./hacks/display-flex'));
Value.hack(require('./hacks/fill-available'));
declsCache = {};
Prefixes = (function() {
function Prefixes(data, browsers) {
var _ref;
this.data = data;
this.browsers = browsers;
_ref = this.preprocess(this.select(this.data)), this.add = _ref[0], this.remove = _ref[1];
this.processor = new Processor(this);
}
Prefixes.prototype.transitionProps = ['transition', 'transition-property'];
Prefixes.prototype.select = function(list) {
var add, all, data, name, notes, selected;
selected = {
add: {},
remove: {}
};
for (name in list) {
data = list[name];
add = data.browsers.map(function(i) {
var params;
params = i.split(' ');
return {
browser: params[0] + ' ' + params[1],
note: params[2]
};
});
notes = add.filter(function(i) {
return i.note;
}).map((function(_this) {
return function(i) {
return _this.browsers.prefix(i.browser) + ' ' + i.note;
};
})(this));
notes = utils.uniq(notes);
add = add.filter((function(_this) {
return function(i) {
return _this.browsers.isSelected(i.browser);
};
})(this)).map((function(_this) {
return function(i) {
var prefix;
prefix = _this.browsers.prefix(i.browser);
if (i.note) {
return prefix + ' ' + i.note;
} else {
return prefix;
}
};
})(this));
add = this.sort(utils.uniq(add));
all = data.browsers.map((function(_this) {
return function(i) {
return _this.browsers.prefix(i);
};
})(this));
if (data.mistakes) {
all = all.concat(data.mistakes);
}
all = all.concat(notes);
all = utils.uniq(all);
if (add.length) {
selected.add[name] = add;
if (add.length < all.length) {
selected.remove[name] = all.filter(function(i) {
return add.indexOf(i) === -1;
});
}
} else {
selected.remove[name] = all;
}
}
return selected;
};
Prefixes.prototype.sort = function(prefixes) {
return prefixes.sort(function(a, b) {
var aLength, bLength;
aLength = utils.removeNote(a).length;
bLength = utils.removeNote(b).length;
if (aLength === bLength) {
return b.length - a.length;
} else {
return bLength - aLength;
}
});
};
Prefixes.prototype.preprocess = function(selected) {
var add, name, old, olds, prefix, prefixed, prefixes, prop, props, remove, selector, value, values, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _len6, _m, _n, _o, _ref, _ref1, _ref2;
add = {
selectors: []
};
_ref = selected.add;
for (name in _ref) {
prefixes = _ref[name];
if (name === '@keyframes') {
add[name] = new Keyframes(name, prefixes, this);
} else if (this.data[name].selector) {
add.selectors.push(Selector.load(name, prefixes, this));
} else {
props = this.data[name].transition ? this.transitionProps : this.data[name].props;
if (props) {
value = Value.load(name, prefixes, this);
for (_i = 0, _len = props.length; _i < _len; _i++) {
prop = props[_i];
if (!add[prop]) {
add[prop] = {
values: []
};
}
add[prop].values.push(value);
}
}
if (!this.data[name].props) {
values = ((_ref1 = add[name]) != null ? _ref1.values : void 0) || [];
add[name] = Declaration.load(name, prefixes, this);
add[name].values = values;
}
}
}
remove = {
selectors: []
};
_ref2 = selected.remove;
for (name in _ref2) {
prefixes = _ref2[name];
if (this.data[name].selector) {
selector = Selector.load(name, prefixes);
for (_j = 0, _len1 = prefixes.length; _j < _len1; _j++) {
prefix = prefixes[_j];
remove.selectors.push(selector.checker(prefix));
}
} else if (name[0] === '@') {
for (_k = 0, _len2 = prefixes.length; _k < _len2; _k++) {
prefix = prefixes[_k];
prefixed = '@' + prefix + name.slice(1);
remove[prefixed] = {
remove: true
};
}
} else {
props = this.data[name].transition ? this.transitionProps : this.data[name].props;
if (props) {
value = Value.load(name, [], this);
for (_l = 0, _len3 = prefixes.length; _l < _len3; _l++) {
prefix = prefixes[_l];
old = value.old(prefix);
if (old) {
for (_m = 0, _len4 = props.length; _m < _len4; _m++) {
prop = props[_m];
if (!remove[prop]) {
remove[prop] = {};
}
if (!remove[prop].values) {
remove[prop].values = [];
}
remove[prop].values.push(old);
}
}
}
}
if (!this.data[name].props) {
for (_n = 0, _len5 = prefixes.length; _n < _len5; _n++) {
prefix = prefixes[_n];
prop = vendor.unprefixed(name);
olds = this.decl(name).old(name, prefix);
for (_o = 0, _len6 = olds.length; _o < _len6; _o++) {
prefixed = olds[_o];
if (!remove[prefixed]) {
remove[prefixed] = {};
}
remove[prefixed].remove = true;
}
}
}
}
}
return [add, remove];
};
Prefixes.prototype.decl = function(prop) {
var decl;
decl = declsCache[prop];
if (decl) {
return decl;
} else {
return declsCache[prop] = Declaration.load(prop);
}
};
Prefixes.prototype.unprefixed = function(prop) {
prop = vendor.unprefixed(prop);
return this.decl(prop).normalize(prop);
};
Prefixes.prototype.prefixed = function(prop, prefix) {
prop = vendor.unprefixed(prop);
return this.decl(prop).prefixed(prop, prefix);
};
Prefixes.prototype.values = function(type, prop) {
var data, global, values, _ref, _ref1;
data = this[type];
global = (_ref = data['*']) != null ? _ref.values : void 0;
values = (_ref1 = data[prop]) != null ? _ref1.values : void 0;
if (global && values) {
return utils.uniq(global.concat(values));
} else {
return global || values || [];
}
};
Prefixes.prototype.group = function(decl) {
var checker, index, length, rule, unprefixed;
rule = decl.parent;
index = rule.index(decl);
length = rule.decls.length;
unprefixed = this.unprefixed(decl.prop);
checker = (function(_this) {
return function(step, callback) {
var other;
index += step;
while (index >= 0 && index < length) {
other = rule.decls[index];
if (_this.unprefixed(other.prop) !== unprefixed) {
break;
} else if (callback(other) === true) {
return true;
}
index += step;
}
return false;
};
})(this);
return {
up: function(callback) {
return checker(-1, callback);
},
down: function(callback) {
return checker(+1, callback);
}
};
};
return Prefixes;
})();
module.exports = Prefixes;
}).call(this);
@@ -0,0 +1,105 @@
(function() {
var Processor, Value, utils, vendor;
vendor = require('postcss/lib/vendor');
Value = require('./value');
utils = require('./utils');
Processor = (function() {
function Processor(prefixes) {
this.prefixes = prefixes;
}
Processor.prototype.add = function(css) {
var prefixer, selector, _i, _len, _ref;
prefixer = this.prefixes.add['@keyframes'];
if (prefixer) {
css.eachAtRule(function(rule) {
return prefixer.process(rule);
});
}
_ref = this.prefixes.add.selectors;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
selector = _ref[_i];
css.eachRule(function(rule) {
return selector.process(rule);
});
}
css.eachDecl((function(_this) {
return function(decl) {
var prefix;
prefix = _this.prefixes.add[decl.prop];
if (prefix && prefix.prefixes) {
return prefix.process(decl);
}
};
})(this));
return css.eachDecl((function(_this) {
return function(decl) {
var unprefixed, value, _j, _len1, _ref1;
unprefixed = _this.prefixes.unprefixed(decl.prop);
_ref1 = _this.prefixes.values('add', unprefixed);
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
value = _ref1[_j];
value.process(decl);
}
return Value.save(_this.prefixes, decl);
};
})(this));
};
Processor.prototype.remove = function(css) {
var checker, _i, _len, _ref;
css.eachAtRule((function(_this) {
return function(rule, i) {
if (_this.prefixes.remove['@' + rule.name]) {
return rule.parent.remove(i);
}
};
})(this));
_ref = this.prefixes.remove.selectors;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
checker = _ref[_i];
css.eachRule((function(_this) {
return function(rule, i) {
if (checker(rule)) {
return rule.parent.remove(i);
}
};
})(this));
}
return css.eachDecl((function(_this) {
return function(decl, i) {
var notHack, rule, unprefixed, _j, _len1, _ref1, _ref2;
rule = decl.parent;
unprefixed = _this.prefixes.unprefixed(decl.prop);
if ((_ref1 = _this.prefixes.remove[decl.prop]) != null ? _ref1.remove : void 0) {
notHack = _this.prefixes.group(decl).down(function(i) {
return i.prop === unprefixed;
});
if (notHack) {
rule.remove(i);
return;
}
}
_ref2 = _this.prefixes.values('remove', unprefixed);
for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) {
checker = _ref2[_j];
if (checker.check(decl.value)) {
rule.remove(i);
return;
}
}
};
})(this));
};
return Processor;
})();
module.exports = Processor;
}).call(this);
@@ -0,0 +1,75 @@
(function() {
var Prefixer, Selector, utils,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Prefixer = require('./prefixer');
utils = require('./utils');
Selector = (function(_super) {
__extends(Selector, _super);
function Selector(name, prefixes, all) {
this.name = name;
this.prefixes = prefixes;
this.all = all;
this.regexpCache = {};
}
Selector.prototype.check = function(rule, prefix) {
var name;
name = prefix ? this.prefixed(prefix) : this.name;
if (rule.selector.indexOf(name) !== -1) {
return !!rule.selector.match(this.regexp(prefix));
} else {
return false;
}
};
Selector.prototype.checker = function(prefix) {
return (function(_this) {
return function(rule) {
return _this.check(rule, prefix);
};
})(this);
};
Selector.prototype.prefixed = function(prefix) {
return this.name.replace(/^([^\w]*)/, '$1' + prefix);
};
Selector.prototype.regexp = function(prefix) {
var name;
if (this.regexpCache[prefix]) {
return this.regexpCache[prefix];
}
name = prefix ? this.prefixed(prefix) : this.name;
return this.regexpCache = RegExp("(^|[^:\"'=])" + (utils.escapeRegexp(name)), "gi");
};
Selector.prototype.replace = function(selector, prefix) {
return selector.replace(this.regexp(), '$1' + this.prefixed(prefix));
};
Selector.prototype.add = function(rule, prefix) {
var cloned, prefixed;
prefixed = this.replace(rule.selector, prefix);
if (rule.parent.some(function(i) {
return i.selector === prefixed;
})) {
return;
}
cloned = this.clone(rule, {
selector: prefixed
});
return rule.parent.insertBefore(rule, cloned);
};
return Selector;
})(Prefixer);
module.exports = Selector;
}).call(this);
+225
View File
@@ -0,0 +1,225 @@
(function() {
var coffee, fs, https;
coffee = require('coffee-script');
https = require('https');
fs = require('fs');
module.exports = {
browsers: {
firefox: 'ff',
chrome: 'chrome',
safari: 'safari',
ios_saf: 'ios',
opera: 'opera',
ie: 'ie',
bb: 'bb',
android: 'android'
},
run: function() {
var i, updaters, _i, _len, _ref, _results;
updaters = __dirname + '/../updaters/';
_ref = fs.readdirSync(updaters).sort();
_results = [];
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
i = _ref[_i];
if (!i.match(/\.(coffee|js)$/)) {
continue;
}
_results.push(require(updaters + i).apply(this));
}
return _results;
},
requests: 0,
doneCallbacks: [],
requestCallbacks: [],
done: function(callback) {
this.doneCallbacks || (this.doneCallbacks = []);
return this.doneCallbacks.push(callback);
},
error: function(message) {
process.stderr.write("\n" + message + "\n");
return process.exit(1);
},
request: function(callback) {
this.requestCallbacks || (this.requestCallbacks = []);
return this.requestCallbacks.push(callback);
},
github: function(path, callback) {
this.requests += 1;
return https.get("https://raw.github.com/" + path, (function(_this) {
return function(res) {
var data;
data = '';
res.on('data', function(chunk) {
return data += chunk;
});
return res.on('end', function() {
var e, func, title, _i, _j, _len, _len1, _ref, _ref1, _results;
try {
callback(JSON.parse(data));
} catch (_error) {
e = _error;
title = data.match(/<title>([^<]+)<\/title>/);
if (title) {
_this.error("" + title[1] + " on " + path);
} else {
_this.error("Parsing error in " + path + ":\n" + e.message);
}
}
_this.requests -= 1;
_ref = _this.requestCallbacks;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
func = _ref[_i];
func();
}
if (_this.requests === 0) {
_ref1 = _this.doneCallbacks.reverse();
_results = [];
for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
func = _ref1[_j];
_results.push(func());
}
return _results;
}
});
};
})(this));
},
sort: function(browsers) {
return browsers.sort(function(a, b) {
a = a.split(' ');
b = b.split(' ');
if (a[0] > b[0]) {
return 1;
} else if (a[0] < b[0]) {
return -1;
} else {
return parseFloat(a[1]) - parseFloat(b[1]);
}
});
},
parse: function(data) {
var browser, interval, need, support, version, versions, _i, _len, _ref, _ref1;
need = [];
_ref = data.stats;
for (browser in _ref) {
versions = _ref[browser];
for (interval in versions) {
support = versions[interval];
_ref1 = interval.split('-');
for (_i = 0, _len = _ref1.length; _i < _len; _i++) {
version = _ref1[_i];
if (this.browsers[browser] && support.match(/\sx($|\s)/)) {
version = version.replace(/\.0$/, '');
need.push(this.browsers[browser] + ' ' + version);
}
}
}
}
return this.sort(need);
},
feature: function(file, callback) {
var url;
url = "Fyrd/caniuse/master/features-json/" + file + ".json";
return this.github(url, (function(_this) {
return function(data) {
return callback(_this.parse(data));
};
})(this));
},
fork: function(fork, file, callback) {
var branch, url, user, _ref;
_ref = fork.split(':'), user = _ref[0], branch = _ref[1];
branch || (branch = 'master');
url = "" + user + "/caniuse/" + branch + "/features-json/" + file + ".json";
return this.github(url, (function(_this) {
return function(data) {
return callback(_this.parse(data));
};
})(this));
},
all: function(callback) {
var browsers, data, list, name, version, _i, _len, _ref;
browsers = require('../data/browsers');
list = [];
for (name in browsers) {
data = browsers[name];
_ref = data.versions;
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
version = _ref[_i];
list.push(name + ' ' + version);
}
}
return callback(this.sort(list));
},
map: function(browsers, callback) {
var browser, name, version, _i, _len, _ref, _results;
_results = [];
for (_i = 0, _len = browsers.length; _i < _len; _i++) {
browser = browsers[_i];
_ref = browser.split(' '), name = _ref[0], version = _ref[1];
version = parseFloat(version);
_results.push(callback(browser, name, version));
}
return _results;
},
stringify: function(obj, indent) {
var key, local, processed, value;
if (indent == null) {
indent = '';
}
if (obj instanceof Array) {
local = indent + ' ';
return ("[\n" + local) + obj.map((function(_this) {
return function(i) {
return _this.stringify(i, local);
};
})(this)).join("\n" + local) + ("\n" + indent + "]");
} else if (typeof obj === 'object') {
local = indent + ' ';
processed = [];
for (key in obj) {
value = obj[key];
if (key.match(/'|-|@|:/)) {
key = "\"" + key + "\"";
}
value = this.stringify(value, local);
if (value[0] !== "\n") {
value = ' ' + value;
}
processed.push(key + ':' + value);
}
return "\n" + local + processed.join("\n" + local) + "\n";
} else {
return JSON.stringify(obj);
}
},
changed: [],
save: function(name, json) {
var content, file, key, sorted, _i, _len, _ref;
sorted = {};
_ref = Object.keys(json).sort();
for (_i = 0, _len = _ref.length; _i < _len; _i++) {
key = _ref[_i];
sorted[key] = json[key];
}
file = __dirname + ("/../data/" + name);
content = "# Don't edit this files, because it's autogenerated.\n" + "# See updaters/ dir for generator. " + "Run `bin/autoprefixer --update` to update." + "\n\n";
content += "module.exports =" + this.stringify(sorted) + ";\n";
if (fs.existsSync(file + '.js')) {
file += '.js';
content = coffee.compile(content);
} else {
file += '.coffee';
}
if (fs.readFileSync(file).toString() !== content) {
this.changed.push(name);
return fs.writeFileSync(file, content);
}
}
};
}).call(this);
+41
View File
@@ -0,0 +1,41 @@
(function() {
module.exports = {
error: function(text) {
var err;
err = new Error(text);
err.autoprefixer = true;
throw err;
},
uniq: function(array) {
var filtered, i, _i, _len;
filtered = [];
for (_i = 0, _len = array.length; _i < _len; _i++) {
i = array[_i];
if (filtered.indexOf(i) === -1) {
filtered.push(i);
}
}
return filtered;
},
removeNote: function(string) {
if (string.indexOf(' ') === -1) {
return string;
} else {
return string.split(' ')[0];
}
},
escapeRegexp: function(string) {
return string.replace(/[.?*+\^\$\[\]\\(){}|\-]/g, '\\$&');
},
regexp: function(word, escape) {
if (escape == null) {
escape = true;
}
if (escape) {
word = this.escapeRegexp(word);
}
return RegExp("(^|[\\s,(])(" + word + "($|[\\s(,]))", "gi");
}
};
}).call(this);
+97
View File
@@ -0,0 +1,97 @@
(function() {
var OldValue, Prefixer, Value, utils, vendor,
__hasProp = {}.hasOwnProperty,
__extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; };
Prefixer = require('./prefixer');
OldValue = require('./old-value');
vendor = require('postcss/lib/vendor');
utils = require('./utils');
Value = (function(_super) {
__extends(Value, _super);
function Value() {
return Value.__super__.constructor.apply(this, arguments);
}
Value.save = function(prefixes, decl) {
var cloned, prefix, prefixed, propPrefix, rule, value, _ref, _results;
_ref = decl._autoprefixerValues;
_results = [];
for (prefix in _ref) {
value = _ref[prefix];
if (value === decl.value) {
continue;
}
propPrefix = vendor.prefix(decl.prop);
if (propPrefix === prefix) {
_results.push(decl.value = value);
} else if (propPrefix === '-pie-') {
continue;
} else {
prefixed = prefixes.prefixed(decl.prop, prefix);
rule = decl.parent;
if (rule.every(function(i) {
return i.prop !== prefixed;
})) {
if (rule.every(function(i) {
return i.prop !== decl.prop || i.value !== value;
})) {
cloned = this.clone(decl, {
value: value
});
_results.push(decl.parent.insertBefore(decl, cloned));
} else {
_results.push(void 0);
}
} else {
_results.push(void 0);
}
}
}
return _results;
};
Value.prototype.check = function(decl) {
var value;
value = decl.value;
if (value.indexOf(this.name) !== -1) {
return !!value.match(this.regexp());
} else {
return false;
}
};
Value.prototype.regexp = function() {
return this.regexpCache || (this.regexpCache = utils.regexp(this.name));
};
Value.prototype.replace = function(string, prefix) {
return string.replace(this.regexp(), '$1' + prefix + '$2');
};
Value.prototype.add = function(decl, prefix) {
var value;
decl._autoprefixerValues || (decl._autoprefixerValues = {});
value = decl._autoprefixerValues[prefix] || decl.value;
value = this.replace(value, prefix);
if (value) {
return decl._autoprefixerValues[prefix] = value;
}
};
Value.prototype.old = function(prefix) {
return new OldValue(prefix + this.name);
};
return Value;
})(Prefixer);
module.exports = Value;
}).call(this);
@@ -0,0 +1,2 @@
test/
.travis.yml
@@ -0,0 +1,112 @@
0.8.1 / 2013-10-24
------------------
* copy failed to return an error to the callback if a file doesn't exist (ulikoehler #38, #39)
0.8.0 / 2013-10-14
------------------
* `filter` implemented on `copy()` and `copySync()`. (Srirangan / #36)
0.7.1 / 2013-10-12
------------------
* `copySync()` implemented (Srirangan / #33)
* updated to the latest `jsonfile` version `1.1.0` which gives `options` params for the JSON methods. Closes #32
0.7.0 / 2013-10-07
------------------
* update readme conventions
* `copy()` now works if destination directory does not exist. Closes #29
0.6.4 / 2013-09-05
------------------
* changed `homepage` field in package.json to remove NPM warning
0.6.3 / 2013-06-28
------------------
* changed JSON spacing default from `4` to `2` to follow Node conventions
* updated `jsonfile` dep
* updated `rimraf` dep
0.6.2 / 2013-06-28
------------------
* added .npmignore, #25
0.6.1 / 2013-05-14
------------------
* modified for `strict` mode, closes #24
* added `outputJson()/outputJsonSync()`, closes #23
0.6.0 / 2013-03-18
------------------
* removed node 0.6 support
* added node 0.10 support
* upgraded to latest `ncp` and `rimraf`.
* optional `graceful-fs` support. Closes #17
0.5.0 / 2013-02-03
------------------
* Removed `readTextFile`.
* Renamed `readJSONFile` to `readJSON` and `readJson`, same with write.
* Restructured documentation a bit. Added roadmap.
0.4.0 / 2013-01-28
------------------
* Set default spaces in `jsonfile` from 4 to 2.
* Updated `testutil` deps for tests.
* Renamed `touch()` to `createFile()`
* Added `outputFile()` and `outputFileSync()`
* Changed creation of testing diretories so the /tmp dir is not littered.
* Added `readTextFile()` and `readTextFileSync()`.
0.3.2 / 2012-11-01
------------------
* Added `touch()` and `touchSync()` methods.
0.3.1 / 2012-10-11
------------------
* Fixed some stray globals.
0.3.0 / 2012-10-09
------------------
* Removed all CoffeeScript from tests.
* Renamed `mkdir` to `mkdirs`/`mkdirp`.
0.2.1 / 2012-09-11
------------------
* Updated `rimraf` dep.
0.2.0 / 2012-09-10
------------------
* Rewrote module into JavaScript. (Must still rewrite tests into JavaScript)
* Added all methods of [jsonfile][https://github.com/jprichardson/node-jsonfile]
* Added Travis-CI.
0.1.3 / 2012-08-13
------------------
* Added method `readJSONFile`.
0.1.2 / 2012-06-15
------------------
* Bug fix: `deleteSync()` didn't exist.
* Verified Node v0.8 compatibility.
0.1.1 / 2012-06-15
------------------
* Fixed bug in `remove()`/`delete()` that wouldn't execute the function if a callback wasn't passed.
0.1.0 / 2012-05-31
------------------
* Renamed `copyFile()` to `copy()`. `copy()` can now copy directories (recursively) too.
* Renamed `rmrf()` to `remove()`.
* `remove()` aliased with `delete()`.
* Added `mkdirp` capabilities. Named: `mkdir()`. Hides Node.js native `mkdir()`.
* Instead of exporting the native `fs` module with new functions, I now copy over the native methods to a new object and export that instead.
0.0.4 / 2012-03-14
------------------
* Removed CoffeeScript dependency
0.0.3 / 2012-01-11
------------------
* Added methods rmrf and rmrfSync
* Moved tests from Jasmine to Mocha
@@ -0,0 +1,16 @@
(The MIT License)
Copyright (c) 2011-2013 JP Richardson
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.
@@ -0,0 +1,332 @@
Node.js: fs-extra
=================
[![build status](https://secure.travis-ci.org/jprichardson/node-fs-extra.png)](http://travis-ci.org/jprichardson/node-fs-extra)
This module adds a few extra file system methods that aren't included in the native `fs` module. It is a drop in replacement for `fs`.
Why?
----
I got tired of including `mkdirp`, `rimraf`, and `cp -r` in most of my projects.
Installation
------------
npm install --save fs-extra
Usage
-----
`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are unmodified and attached to `fs-extra`.
You don't ever need to include the original `fs` module again:
```javascript
var fs = require('fs') //this is no longer necessary
```
you can now do this:
```javascript
var fs = require('fs-extra'); //var fs = require('fs')
```
or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
to do this:
```javascript
//var fs = require('fs')
var fse = require('fs-extra')
```
you can also keep, both, but it's redundant:
```javascript
var fs = require('fs')
, fse = require('fs-extra')
```
Methods
-------
**NOTE:** You can still use the native Node.js methods. They are copied over to `fs-extra`.
### copy(src, dest, [filter], callback)
Copy a file or directory. The directory can have contents. Like `cp -r`. There isn't a synchronous version implemented yet.
Sync: `copySync()`
Examples:
```javascript
var fs = require('fs-extra');
fs.copy('/tmp/myfile', '/tmp/mynewfile', function(err){
if (err) return console.error(err);
console.log("success!")
}); //copies file
fs.copy('/tmp/mydir', '/tmp/mynewdir', function(err){
if (err) return console.error(err);
console.log("success!")
}); //copies directory, even if it has subdirectories or files
```
### createFile(file, callback)
Creates a file. If the file that is requested to be created is in directories that do not exist, these directories are created. If the file already exists, it is **NOT MODIFIED**.
Sync: `createFileSync()`
Example:
```javascript
var fs = require('fs-extra')
var file = '/tmp/this/path/does/not/exist/file.txt'
fs.createFile(file, function(err) {
console.log(err); //null
//file has now been created, including the directory it is to be placed in
})
```
### mkdirs(dir, callback)
Creates a directory. If the parent hierarchy doesn't exist, it's created. Like `mkdir -p`.
Alias: `mkdirp()`
Sync: `mkdirsSync()` / `mkdirpSync()`
Examples:
```javascript
var fs = require('fs-extra');
fs.mkdirs('/tmp/some/long/path/that/prob/doesnt/exist', function(err){
if (err) return console.error(err);
console.log("success!")
});
fs.mkdirsSync('/tmp/another/path');
```
### outputFile(file, data, callback)
Almost the same as `writeFile`, except that if the directory does not exist, it's created.
Sync: `outputFileSync()`
Example:
```javascript
var fs = require('fs-extra')
var file = '/tmp/this/path/does/not/exist/file.txt'
fs.outputFile(file, 'hello!', function(err) {
console.log(err); //null
fs.readFile(file, 'utf8', function(err, data) {
console.log(data); //hello!
})
})
```
### outputJson(file, data, callback)
Almost the same as `writeJson`, except that if the directory does not exist, it's created.
Alias: `outputJSON()
Sync: `outputJsonSync()`, `outputJSONSync()`
Example:
```javascript
var fs = require('fs-extra')
var file = '/tmp/this/path/does/not/exist/file.txt'
fs.outputJson(file, {name: 'JP'}, function(err) {
console.log(err); //null
fs.readJson(file, function(err, data) {
console.log(data.name); //'JP
})
})
```
### readJson(file, [options], callback)
Reads a JSON file and then parses it into an object. `options` are the same that you'd pass to `fs.readFile`.
Alias: `readJSON()`
Sync: `readJsonSync()`, `readJSONSync()`
Example:
```javascript
var fs = require('fs-extra');
fs.readJson('./package.json', function(err, packageObj) {
console.log(packageObj.version); //0.1.3
});
```
### remove(dir, callback)
Removes a file or directory. The directory can have contents. Like `rm -rf`.
Alias: `delete()`
Sync: `removeSync()` / `deleteSync()`
Examples:
```javascript
var fs = require('fs-extra');
fs.remove('/tmp/myfile', function(err){
if (err) return console.error(err);
console.log("success!")
});
fs.removeSync('/home/jprichardson'); //I just deleted my entire HOME directory.
```
### writeJson(file, object, [options], callback)
Writes an object to a JSON file. `options` are the same that you'd pass to `fs.readFile`.
Alias: `writeJSON()`
Sync: `writeJsonSync()`, `writeJSONSync()`
Example:
```javascript
var fs = require('fs-extra');
fs.writeJson('./package.json', {name: 'fs-extra'}, function(err){
console.log(err);
});
```
Roadmap to 1.0.0
-----------------
This contains items that I'm considering doing. I'd love community feedback.
* File system walker. I really like this one: https://github.com/daaku/nodejs-walker ... this might be adding too much. Thoughts?
* File/directory tree watcher. There are quite a few. ... this also might be adding too much. I like this one: https://github.com/paulmillr/chokidar but I don't like that it's written in CoffeeScript. Thoughts?
* Method to move files.
* Thinking about moving `rimraf`, `ncp`, and `mkdirps` code into this library. I'd like fs-extra to be a stable library that module authors
can depend upon. A bunch of other dependencies kinda sucks for modules/libraries. (I'm leaning against this now.)
* Change documentation to use the `fse` prefix instead of `fs`. This may encourage people to start using `fse` as a prefix and hence make their code clearer that they're not using the native `fs`. I'm very undecided on this one since `fs-extra` is a drop in replacement for the native `fs`. (I'm leaning against this now.)
Naming
------
I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
* https://github.com/jprichardson/node-fs-extra/issues/2
* https://github.com/flatiron/utile/issues/11
* https://github.com/ryanmcgrath/wrench-js/issues/29
* https://github.com/substack/node-mkdirp/issues/17
First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)` or its alias `fs.delete(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
Credit
------
`fs-extra` wouldn't be possible without using the modules from the following authors:
- [Isaac Shlueter](https://github.com/isaacs)
- [Charlie McConnel](https://github.com/avianflu)
- [James Halliday](https://github.com/substack)
Contributions
-------------
If you want to contribute, please add a test if you can. Also, don't change the version in `package.json`.
### Contributors
- [JP Richardson](https://github.com/jprichardson)
- [Mike McNeil](https://github.com/mikermcneil)
- [Ian Crowther](https://github.com/iancrowther)
- [Stephen Mathieson](https://github.com/stephenmathieson)
- [Srirangan](https://github.com/Srirangan)
- [Uli Köhler](https://github.com/ulikoehler)
- `<your name here>`
License
-------
Licensed under MIT
Copyright (c) 2011-2013 JP Richardson
[1]: http://nodejs.org/docs/latest/api/fs.html
[jsonfile]: https://github.com/jprichardson/node-jsonfile
@@ -0,0 +1,79 @@
"use strict"
var fs = require('fs')
, ncp = require('ncp').ncp
, path = require('path')
, mkdir = require('./mkdir'),
create = require('./create')
module.exports.copy = copy;
module.exports.copySync = copySync;
var BUF_LENGTH = 64 * 1024
var _buff = new Buffer(BUF_LENGTH)
var copyFileSync = function(srcFile, destFile) {
var bytesRead, fdr, fdw, pos;
fdr = fs.openSync(srcFile, 'r');
fdw = fs.openSync(destFile, 'w');
bytesRead = 1;
pos = 0;
while (bytesRead > 0) {
bytesRead = fs.readSync(fdr, _buff, 0, BUF_LENGTH, pos);
fs.writeSync(fdw, _buff, 0, bytesRead);
pos += bytesRead;
}
fs.closeSync(fdr);
return fs.closeSync(fdw);
}
function copy(src, dest, filter, callback) {
if( typeof filter === "function" && !callback) {
callback = filter;
filter = null;
}
callback = callback || function(){}
fs.lstat(src, function(err, stats) {
if (err) return callback(err)
var dir = null
if (stats.isDirectory()) {
var parts = dest.split(path.sep)
parts.pop()
dir = parts.join(path.sep)
} else {
dir = path.dirname(dest)
}
fs.exists(dir, function(dirExists) {
if (dirExists) return ncp(src, dest, {filter: filter}, callback);
mkdir.mkdirs(dir, function(err) {
if (err) return callback(err)
ncp(src, dest, {filter: filter}, callback);
})
})
})
}
function copySync(src, dest, filter) {
filter = filter || function () { return true; };
var stats = fs.lstatSync(src),
destExists = fs.exists(dest),
performCopy = false;
if (stats.isFile()) {
if (filter instanceof RegExp) performCopy = filter.test(src);
else if (typeof filter === "function") performCopy = filter(src);
if(performCopy) {
if (!destExists) create.createFileSync(dest);
copyFileSync(src, dest);
}
}
else if (stats.isDirectory()) {
if (!destExists) mkdir.mkdirsSync(dest);
var contents = fs.readdirSync(src);
contents.forEach(function (content) {
copySync(src + "/" + content, dest + "/" + content);
});
}
}
@@ -0,0 +1,55 @@
"use strict"
var mkdir = require('./mkdir')
, path = require('path')
, fs = require('fs')
, exists = fs.exists || path.exists
, existsSync = fs.existsSync || path.existsSync
function createFile (file, callback) {
function makeFile() {
fs.writeFile(file, '', function(err) {
if (err)
callback(err)
else
callback(null);
})
}
exists(file, function(fileExists) {
if (fileExists)
return callback(null);
else {
var dir = path.dirname(file);
exists(dir, function(dirExists) {
if (!dirExists) {
mkdir.mkdirs(dir, function(err) {
if (err)
callback(err)
else
makeFile();
})
} else {
makeFile();
}
})
}
})
}
function createFileSync (file) {
if (existsSync(file))
return;
var dir = path.dirname(file);
if (!existsSync(dir))
mkdir.mkdirsSync(dir);
fs.writeFileSync(file, '');
}
module.exports.createFile = createFile;
module.exports.createFileSync = createFileSync;
@@ -0,0 +1,110 @@
"use strict"
var fs = null
, path = require('path')
, jsonFile = require('jsonfile')
, json = require('./json')
, fse = {};
try {
// optional dependency
fs = require("graceful-fs")
} catch (er) {
fs = require("fs")
}
Object.keys(fs).forEach(function(key) {
var func = fs[key];
if (typeof func == 'function')
fse[key] = func;
});
fs = fse;
// copy
fs.copy = require('./copy').copy;
fs.copySync = require('./copy').copySync;
// remove
var remove = require('./remove');
fs.remove = remove.remove;
fs.removeSync = remove.removeSync;
fs['delete'] = fs.remove
fs.deleteSync = fs.removeSync
// mkdir
var mkdir = require('./mkdir')
fs.mkdirs = mkdir.mkdirs
fs.mkdirsSync = mkdir.mkdirsSync
fs.mkdirp = mkdir.mkdirs
fs.mkdirpSync = mkdir.mkdirsSync
// create
var create = require('./create')
fs.createFile = create.createFile;
fs.createFileSync = create.createFileSync;
//deprecated
fs.touch = function touch() {
console.log('fs.touch() is deprecated. Please use fs.createFile().')
fs.createFile.apply(null, arguments)
}
fs.touchSync = function touchSync() {
console.log('fs.touchSync() is deprecated. Please use fs.createFileSync().')
fs.createFileSync.apply(null, arguments)
}
// output
var output = require('./output');
fs.outputFile = output.outputFile;
fs.outputFileSync = output.outputFileSync;
// read
/*fs.readTextFile = function(file, callback) {
return fs.readFile(file, 'utf8', callback)
}
fs.readTextFileSync = function(file, callback) {
return fs.readFileSync(file, 'utf8')
}*/
// json files
fs.readJsonFile = jsonFile.readFile;
fs.readJSONFile = jsonFile.readFile;
fs.readJsonFileSync = jsonFile.readFileSync;
fs.readJSONFileSync = jsonFile.readFileSync;
fs.readJson = jsonFile.readFile;
fs.readJSON = jsonFile.readFile;
fs.readJsonSync = jsonFile.readFileSync;
fs.readJSONSync = jsonFile.readFileSync;
fs.outputJsonSync = json.outputJsonSync;
fs.outputJSONSync = json.outputJsonSync;
fs.outputJson = json.outputJson;
fs.outputJSON = json.outputJson;
fs.writeJsonFile = jsonFile.writeFile;
fs.writeJSONFile = jsonFile.writeFile;
fs.writeJsonFileSync = jsonFile.writeFileSync;
fs.writeJSONFileSync = jsonFile.writeFileSync;
fs.writeJson = jsonFile.writeFile;
fs.writeJSON = jsonFile.writeFile;
fs.writeJsonSync = jsonFile.writeFileSync;
fs.writeJSONSync = jsonFile.writeFileSync;
module.exports = fs
jsonFile.spaces = 2; //set to 2
module.exports.jsonfile = jsonFile; //so users of fs-extra can modify jsonFile.spaces;
@@ -0,0 +1,30 @@
"use strict"
var jsonFile = require('jsonfile')
, fs = require('fs')
, mkdir = require('./mkdir')
, path = require('path')
var me = module.exports
me.outputJsonSync = function(file, data) {
var dir = path.dirname(file)
if (!fs.existsSync(dir))
mkdir.mkdirsSync(dir)
jsonFile.writeFileSync(file, data)
}
me.outputJson = function(file, data, callback) {
var dir = path.dirname(file)
fs.exists(dir, function(itDoes) {
if (itDoes) return jsonFile.writeFile(file, data, callback)
mkdir.mkdirs(dir, function(err) {
if (err) return callback(err)
jsonFile.writeFile(file, data, callback)
})
})
}
@@ -0,0 +1,8 @@
"use strict"
var mkdirp = require('mkdirp');
module.exports.mkdirs = mkdirp;
module.exports.mkdirsSync = mkdirp.sync;
@@ -0,0 +1,37 @@
"use strict"
var mkdir = require('./mkdir')
, path = require('path')
, fs = require('fs')
, exists = fs.exists || path.exists
, existsSync = fs.existsSync || path.existsSync
function outputFile (file, data, encoding, callback) {
if (typeof encoding === 'function') {
callback = encoding
encoding = 'utf8'
}
var dir = path.dirname(file)
exists(dir, function(itDoes) {
if (itDoes) return fs.writeFile(file, data, encoding, callback)
mkdir.mkdirs(dir, function(err) {
if (err) return callback(err)
fs.writeFile(file, data, encoding, callback)
})
})
}
function outputFileSync (file, data, encoding) {
var dir = path.dirname(file)
if (existsSync(dir)) return fs.writeFileSync.apply(fs, arguments)
mkdir.mkdirsSync(dir)
fs.writeFileSync.apply(fs, arguments)
}
module.exports.outputFile = outputFile;
module.exports.outputFileSync = outputFileSync;
@@ -0,0 +1,19 @@
"use strict"
var rimraf = require('rimraf')
, fs = require('fs');
function rmrfSync(dir) {
return rimraf.sync(dir);
}
function rmrf(dir, cb) {
if (cb != null) {
return rimraf(dir, cb);
} else {
return rimraf(dir, (function() {}));
}
}
module.exports.remove = rmrf;
module.exports.removeSync = rmrfSync;
@@ -0,0 +1 @@
../ncp/bin/ncp
@@ -0,0 +1 @@
../rimraf/bin.js
@@ -0,0 +1,2 @@
test/
.travis.yml
@@ -0,0 +1,20 @@
1.1.1 / 2013-11-11
------------------
* fixed catching of callback bug (ffissore / #5)
1.1.0 / 2013-10-11
------------------
* added `options` param to methods, (seanodell / #4)
1.0.1 / 2013-09-05
------------------
* removed `homepage` field from package.json to remove NPM warning
1.0.0 / 2013-06-28
------------------
* added `.npmignore`, #1
* changed spacing default from `4` to `2` to follow Node conventions
0.0.1 / 2012-09-10
------------------
* Initial release.
@@ -0,0 +1,15 @@
(The MIT License)
Copyright (c) 2012, JP Richardson <jprichardson@gmail.com>
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.
@@ -0,0 +1,121 @@
[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.png)](http://travis-ci.org/jprichardson/node-jsonfile)
Node.js - jsonfile
================
Easily read/write JSON files.
Why?
----
Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying.
Installation
------------
npm install jsonfile --save
API
---
### readFile(filename, [options], callback)
```javascript
var jf = require('jsonfile')
, util = require('util');
var file = '/tmp/data.json';
js.readFile(file, function(err, obj) {
console.log(util.inspect(obj));
});
```
### readFileSync(filename, [options])
```javascript
var jf = require('jsonfile')
, util = require('util');
var file = '/tmp/data.json';
console.log(util.inspect(jf.readFileSync(file)));
```
### writeFile(filename, [options], callback)
```javascript
var jf = require('jsonfile')
var file = '/tmp/data.json';
var obj = {name: 'JP'};
jf.writeFile(file, obj, function(err) {
console.log(err);
})
```
### writeFileSync(filename, [options])
```javascript
var jf = require('jsonfile')
var file = '/tmp/data.json';
var obj = {name: 'JP'};
jf.writeFileSync(file, obj);
```
### spaces
Number of spaces to indent JSON files.
**default:** 2
```
var jf = require('jsonfile');
jf.spaces = 4;
var file = '/tmp/data.json';
var obj = {name: 'JP'};
jf.writeFile(file, obj, function(err) { //json file has four space indenting now
console.log(err);
});
```
Contributions
-------------
If you contribute to this library, please don't change the version numbers in your pull request.
### Contributors
(You can add your name, or I'll add it if you forget)
- [*] [JP Richardson](https://github.com/jprichardson)
- [2] [Sean O'Dell](https://github.com/seanodell)
- [1] [Federico Fissore](https://github.com/ffissore)
License
-------
(MIT License)
Copyright 2012-2013, JP Richardson <jprichardson@gmail.com>
@@ -0,0 +1,47 @@
var fs = require('fs');
var me = module.exports;
me.spaces = 2;
me.readFile = function(file, callback) {
fs.readFile(file, 'utf8', function(err, data) {
if (err) return callback(err, null);
var obj = null;
try {
obj = JSON.parse(data);
} catch (err2) {
callback(err2, null);
return;
}
callback(null, obj);
})
}
me.readFileSync = function(file) {
return JSON.parse(fs.readFileSync(file, 'utf8'));
}
me.writeFile = function(file, obj, options, callback) {
if (callback == null) { // odd little swap because options is optional
callback = options;
options = null;
}
var str = '';
try {
str = JSON.stringify(obj, null, module.exports.spaces);
} catch (err) {
if (callback) {
callback(err, null);
}
return;
}
fs.writeFile(file, str, options, callback);
}
me.writeFileSync = function(file, obj, options) {
var str = JSON.stringify(obj, null, module.exports.spaces);
return fs.writeFileSync(file, str, options); //not sure if fs.writeFileSync returns anything, but just in case
}
@@ -0,0 +1,42 @@
{
"name": "jsonfile",
"version": "1.1.1",
"description": "Easily read/write JSON files.",
"repository": {
"type": "git",
"url": "git@github.com:jprichardson/node-jsonfile.git"
},
"keywords": [
"read",
"write",
"file",
"json"
],
"author": {
"name": "JP Richardson",
"email": "jprichardson@gmail.com"
},
"licenses": [
{
"type": "MIT",
"url": ""
}
],
"dependencies": {},
"devDependencies": {
"testutil": "~0.5.1",
"mocha": "*"
},
"main": "./lib/jsonfile.js",
"scripts": {
"test": "mocha test"
},
"readme": "[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.png)](http://travis-ci.org/jprichardson/node-jsonfile)\n\nNode.js - jsonfile\n================\n\nEasily read/write JSON files. \n\n\nWhy?\n----\n\nWriting `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying.\n\n\n\nInstallation\n------------\n\n npm install jsonfile --save\n\n\n\nAPI\n---\n\n### readFile(filename, [options], callback)\n\n```javascript\nvar jf = require('jsonfile')\n , util = require('util');\n\nvar file = '/tmp/data.json';\njs.readFile(file, function(err, obj) {\n console.log(util.inspect(obj)); \n});\n```\n\n\n### readFileSync(filename, [options])\n\n```javascript\nvar jf = require('jsonfile')\n , util = require('util');\n\nvar file = '/tmp/data.json';\n\nconsole.log(util.inspect(jf.readFileSync(file)));\n```\n\n\n### writeFile(filename, [options], callback)\n\n```javascript\nvar jf = require('jsonfile')\n\nvar file = '/tmp/data.json';\nvar obj = {name: 'JP'};\n\njf.writeFile(file, obj, function(err) {\n console.log(err);\n})\n```\n\n### writeFileSync(filename, [options])\n\n```javascript\nvar jf = require('jsonfile')\n\nvar file = '/tmp/data.json';\nvar obj = {name: 'JP'};\n\njf.writeFileSync(file, obj);\n```\n\n\n### spaces\n\nNumber of spaces to indent JSON files. \n\n**default:** 2\n\n```\nvar jf = require('jsonfile');\n\njf.spaces = 4;\n\nvar file = '/tmp/data.json';\nvar obj = {name: 'JP'};\n\njf.writeFile(file, obj, function(err) { //json file has four space indenting now\n console.log(err);\n});\n```\n\n\nContributions\n-------------\n\nIf you contribute to this library, please don't change the version numbers in your pull request.\n\n\n### Contributors\n\n(You can add your name, or I'll add it if you forget)\n\n- [*] [JP Richardson](https://github.com/jprichardson)\n- [2] [Sean O'Dell](https://github.com/seanodell)\n- [1] [Federico Fissore](https://github.com/ffissore)\n\n\nLicense\n-------\n\n(MIT License)\n\nCopyright 2012-2013, JP Richardson <jprichardson@gmail.com>\n\n\n\n\n\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/jprichardson/node-jsonfile/issues"
},
"homepage": "https://github.com/jprichardson/node-jsonfile",
"_id": "jsonfile@1.1.1",
"_from": "jsonfile@~1.1.0"
}
@@ -0,0 +1,2 @@
node_modules/
npm-debug.log
@@ -0,0 +1,5 @@
language: node_js
node_js:
- 0.6
- 0.8
- 0.9
@@ -0,0 +1,21 @@
Copyright 2010 James Halliday (mail@substack.net)
This project is free software released under the MIT/X11 license:
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.
@@ -0,0 +1,6 @@
var mkdirp = require('mkdirp');
mkdirp('/tmp/foo/bar/baz', function (err) {
if (err) console.error(err)
else console.log('pow!')
});
@@ -0,0 +1,82 @@
var path = require('path');
var fs = require('fs');
module.exports = mkdirP.mkdirp = mkdirP.mkdirP = mkdirP;
function mkdirP (p, mode, f, made) {
if (typeof mode === 'function' || mode === undefined) {
f = mode;
mode = 0777 & (~process.umask());
}
if (!made) made = null;
var cb = f || function () {};
if (typeof mode === 'string') mode = parseInt(mode, 8);
p = path.resolve(p);
fs.mkdir(p, mode, function (er) {
if (!er) {
made = made || p;
return cb(null, made);
}
switch (er.code) {
case 'ENOENT':
mkdirP(path.dirname(p), mode, function (er, made) {
if (er) cb(er, made);
else mkdirP(p, mode, cb, made);
});
break;
// In the case of any other error, just see if there's a dir
// there already. If so, then hooray! If not, then something
// is borked.
default:
fs.stat(p, function (er2, stat) {
// if the stat fails, then that's super weird.
// let the original error be the failure reason.
if (er2 || !stat.isDirectory()) cb(er, made)
else cb(null, made);
});
break;
}
});
}
mkdirP.sync = function sync (p, mode, made) {
if (mode === undefined) {
mode = 0777 & (~process.umask());
}
if (!made) made = null;
if (typeof mode === 'string') mode = parseInt(mode, 8);
p = path.resolve(p);
try {
fs.mkdirSync(p, mode);
made = made || p;
}
catch (err0) {
switch (err0.code) {
case 'ENOENT' :
made = sync(path.dirname(p), mode, made);
sync(p, mode, made);
break;
// In the case of any other error, just see if there's a dir
// there already. If so, then hooray! If not, then something
// is borked.
default:
var stat;
try {
stat = fs.statSync(p);
}
catch (err1) {
throw err0;
}
if (!stat.isDirectory()) throw err0;
break;
}
}
return made;
};
@@ -0,0 +1,34 @@
{
"name": "mkdirp",
"description": "Recursively mkdir, like `mkdir -p`",
"version": "0.3.5",
"author": {
"name": "James Halliday",
"email": "mail@substack.net",
"url": "http://substack.net"
},
"main": "./index",
"keywords": [
"mkdir",
"directory"
],
"repository": {
"type": "git",
"url": "http://github.com/substack/node-mkdirp.git"
},
"scripts": {
"test": "tap test/*.js"
},
"devDependencies": {
"tap": "~0.4.0"
},
"license": "MIT",
"readme": "# mkdirp\n\nLike `mkdir -p`, but in node.js!\n\n[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)\n\n# example\n\n## pow.js\n\n```js\nvar mkdirp = require('mkdirp');\n \nmkdirp('/tmp/foo/bar/baz', function (err) {\n if (err) console.error(err)\n else console.log('pow!')\n});\n```\n\nOutput\n\n```\npow!\n```\n\nAnd now /tmp/foo/bar/baz exists, huzzah!\n\n# methods\n\n```js\nvar mkdirp = require('mkdirp');\n```\n\n## mkdirp(dir, mode, cb)\n\nCreate a new directory and any necessary subdirectories at `dir` with octal\npermission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\n`cb(err, made)` fires with the error or the first directory `made`\nthat had to be created, if any.\n\n## mkdirp.sync(dir, mode)\n\nSynchronously create a new directory and any necessary subdirectories at `dir`\nwith octal permission string `mode`.\n\nIf `mode` isn't specified, it defaults to `0777 & (~process.umask())`.\n\nReturns the first directory that had to be created, if any.\n\n# install\n\nWith [npm](http://npmjs.org) do:\n\n```\nnpm install mkdirp\n```\n\n# license\n\nMIT\n",
"readmeFilename": "readme.markdown",
"bugs": {
"url": "https://github.com/substack/node-mkdirp/issues"
},
"homepage": "https://github.com/substack/node-mkdirp",
"_id": "mkdirp@0.3.5",
"_from": "mkdirp@0.3.x"
}
@@ -0,0 +1,63 @@
# mkdirp
Like `mkdir -p`, but in node.js!
[![build status](https://secure.travis-ci.org/substack/node-mkdirp.png)](http://travis-ci.org/substack/node-mkdirp)
# example
## pow.js
```js
var mkdirp = require('mkdirp');
mkdirp('/tmp/foo/bar/baz', function (err) {
if (err) console.error(err)
else console.log('pow!')
});
```
Output
```
pow!
```
And now /tmp/foo/bar/baz exists, huzzah!
# methods
```js
var mkdirp = require('mkdirp');
```
## mkdirp(dir, mode, cb)
Create a new directory and any necessary subdirectories at `dir` with octal
permission string `mode`.
If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
`cb(err, made)` fires with the error or the first directory `made`
that had to be created, if any.
## mkdirp.sync(dir, mode)
Synchronously create a new directory and any necessary subdirectories at `dir`
with octal permission string `mode`.
If `mode` isn't specified, it defaults to `0777 & (~process.umask())`.
Returns the first directory that had to be created, if any.
# install
With [npm](http://npmjs.org) do:
```
npm install mkdirp
```
# license
MIT
@@ -0,0 +1,38 @@
var mkdirp = require('../').mkdirp;
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
var ps = [ '', 'tmp' ];
for (var i = 0; i < 25; i++) {
var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
ps.push(dir);
}
var file = ps.join('/');
test('chmod-pre', function (t) {
var mode = 0744
mkdirp(file, mode, function (er) {
t.ifError(er, 'should not error');
fs.stat(file, function (er, stat) {
t.ifError(er, 'should exist');
t.ok(stat && stat.isDirectory(), 'should be directory');
t.equal(stat && stat.mode & 0777, mode, 'should be 0744');
t.end();
});
});
});
test('chmod', function (t) {
var mode = 0755
mkdirp(file, mode, function (er) {
t.ifError(er, 'should not error');
fs.stat(file, function (er, stat) {
t.ifError(er, 'should exist');
t.ok(stat && stat.isDirectory(), 'should be directory');
t.end();
});
});
});
@@ -0,0 +1,37 @@
var mkdirp = require('../').mkdirp;
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
var ps = [ '', 'tmp' ];
for (var i = 0; i < 25; i++) {
var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
ps.push(dir);
}
var file = ps.join('/');
// a file in the way
var itw = ps.slice(0, 3).join('/');
test('clobber-pre', function (t) {
console.error("about to write to "+itw)
fs.writeFileSync(itw, 'I AM IN THE WAY, THE TRUTH, AND THE LIGHT.');
fs.stat(itw, function (er, stat) {
t.ifError(er)
t.ok(stat && stat.isFile(), 'should be file')
t.end()
})
})
test('clobber', function (t) {
t.plan(2);
mkdirp(file, 0755, function (err) {
t.ok(err);
t.equal(err.code, 'ENOTDIR');
t.end();
});
});
@@ -0,0 +1,28 @@
var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('woo', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var file = '/tmp/' + [x,y,z].join('/');
mkdirp(file, 0755, function (err) {
if (err) t.fail(err);
else path.exists(file, function (ex) {
if (!ex) t.fail('file not created')
else fs.stat(file, function (err, stat) {
if (err) t.fail(err)
else {
t.equal(stat.mode & 0777, 0755);
t.ok(stat.isDirectory(), 'target not a directory');
t.end();
}
})
})
});
});
@@ -0,0 +1,32 @@
var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('async perm', function (t) {
t.plan(2);
var file = '/tmp/' + (Math.random() * (1<<30)).toString(16);
mkdirp(file, 0755, function (err) {
if (err) t.fail(err);
else path.exists(file, function (ex) {
if (!ex) t.fail('file not created')
else fs.stat(file, function (err, stat) {
if (err) t.fail(err)
else {
t.equal(stat.mode & 0777, 0755);
t.ok(stat.isDirectory(), 'target not a directory');
t.end();
}
})
})
});
});
test('async root perm', function (t) {
mkdirp('/tmp', 0755, function (err) {
if (err) t.fail(err);
t.end();
});
t.end();
});
@@ -0,0 +1,39 @@
var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('sync perm', function (t) {
t.plan(2);
var file = '/tmp/' + (Math.random() * (1<<30)).toString(16) + '.json';
mkdirp.sync(file, 0755);
path.exists(file, function (ex) {
if (!ex) t.fail('file not created')
else fs.stat(file, function (err, stat) {
if (err) t.fail(err)
else {
t.equal(stat.mode & 0777, 0755);
t.ok(stat.isDirectory(), 'target not a directory');
t.end();
}
})
});
});
test('sync root perm', function (t) {
t.plan(1);
var file = '/tmp';
mkdirp.sync(file, 0755);
path.exists(file, function (ex) {
if (!ex) t.fail('file not created')
else fs.stat(file, function (err, stat) {
if (err) t.fail(err)
else {
t.ok(stat.isDirectory(), 'target not a directory');
t.end();
}
})
});
});
@@ -0,0 +1,41 @@
var mkdirp = require('../').mkdirp;
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('race', function (t) {
t.plan(4);
var ps = [ '', 'tmp' ];
for (var i = 0; i < 25; i++) {
var dir = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
ps.push(dir);
}
var file = ps.join('/');
var res = 2;
mk(file, function () {
if (--res === 0) t.end();
});
mk(file, function () {
if (--res === 0) t.end();
});
function mk (file, cb) {
mkdirp(file, 0755, function (err) {
if (err) t.fail(err);
else path.exists(file, function (ex) {
if (!ex) t.fail('file not created')
else fs.stat(file, function (err, stat) {
if (err) t.fail(err)
else {
t.equal(stat.mode & 0777, 0755);
t.ok(stat.isDirectory(), 'target not a directory');
if (cb) cb();
}
})
})
});
}
});
@@ -0,0 +1,32 @@
var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('rel', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var cwd = process.cwd();
process.chdir('/tmp');
var file = [x,y,z].join('/');
mkdirp(file, 0755, function (err) {
if (err) t.fail(err);
else path.exists(file, function (ex) {
if (!ex) t.fail('file not created')
else fs.stat(file, function (err, stat) {
if (err) t.fail(err)
else {
process.chdir(cwd);
t.equal(stat.mode & 0777, 0755);
t.ok(stat.isDirectory(), 'target not a directory');
t.end();
}
})
})
});
});
@@ -0,0 +1,25 @@
var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('return value', function (t) {
t.plan(4);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var file = '/tmp/' + [x,y,z].join('/');
// should return the first dir created.
// By this point, it would be profoundly surprising if /tmp didn't
// already exist, since every other test makes things in there.
mkdirp(file, function (err, made) {
t.ifError(err);
t.equal(made, '/tmp/' + x);
mkdirp(file, function (err, made) {
t.ifError(err);
t.equal(made, null);
});
});
});
@@ -0,0 +1,24 @@
var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('return value', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var file = '/tmp/' + [x,y,z].join('/');
// should return the first dir created.
// By this point, it would be profoundly surprising if /tmp didn't
// already exist, since every other test makes things in there.
// Note that this will throw on failure, which will fail the test.
var made = mkdirp.sync(file);
t.equal(made, '/tmp/' + x);
// making the same file again should have no effect.
made = mkdirp.sync(file);
t.equal(made, null);
});
@@ -0,0 +1,18 @@
var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('root', function (t) {
// '/' on unix, 'c:/' on windows.
var file = path.resolve('/');
mkdirp(file, 0755, function (err) {
if (err) throw err
fs.stat(file, function (er, stat) {
if (er) throw er
t.ok(stat.isDirectory(), 'target is a directory');
t.end();
})
});
});
@@ -0,0 +1,32 @@
var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('sync', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var file = '/tmp/' + [x,y,z].join('/');
try {
mkdirp.sync(file, 0755);
} catch (err) {
t.fail(err);
return t.end();
}
path.exists(file, function (ex) {
if (!ex) t.fail('file not created')
else fs.stat(file, function (err, stat) {
if (err) t.fail(err)
else {
t.equal(stat.mode & 0777, 0755);
t.ok(stat.isDirectory(), 'target not a directory');
t.end();
}
});
});
});
@@ -0,0 +1,28 @@
var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('implicit mode from umask', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var file = '/tmp/' + [x,y,z].join('/');
mkdirp(file, function (err) {
if (err) t.fail(err);
else path.exists(file, function (ex) {
if (!ex) t.fail('file not created')
else fs.stat(file, function (err, stat) {
if (err) t.fail(err)
else {
t.equal(stat.mode & 0777, 0777 & (~process.umask()));
t.ok(stat.isDirectory(), 'target not a directory');
t.end();
}
})
})
});
});
@@ -0,0 +1,32 @@
var mkdirp = require('../');
var path = require('path');
var fs = require('fs');
var test = require('tap').test;
test('umask sync modes', function (t) {
t.plan(2);
var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16);
var file = '/tmp/' + [x,y,z].join('/');
try {
mkdirp.sync(file);
} catch (err) {
t.fail(err);
return t.end();
}
path.exists(file, function (ex) {
if (!ex) t.fail('file not created')
else fs.stat(file, function (err, stat) {
if (err) t.fail(err)
else {
t.equal(stat.mode & 0777, (0777 & (~process.umask())));
t.ok(stat.isDirectory(), 'target not a directory');
t.end();
}
});
});
});
@@ -0,0 +1,4 @@
node_modules
.*.sw[op]
.DS_Store
test/fixtures/out
@@ -0,0 +1,7 @@
language: node_js
node_js:
- 0.4
- 0.6
- 0.7
- 0.8
@@ -0,0 +1,21 @@
# MIT License
###Copyright (C) 2011 by Charlie McConnell
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.
@@ -0,0 +1,52 @@
# ncp - Asynchronous recursive file & directory copying
[![Build Status](https://secure.travis-ci.org/AvianFlu/ncp.png)](http://travis-ci.org/AvianFlu/ncp)
Think `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically.
## Command Line usage
Usage is simple: `ncp [source] [dest] [--limit=concurrency limit]
[--filter=filter] --stopOnErr`
The 'filter' is a Regular Expression - matched files will be copied.
The 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time.
'stopOnErr' is a boolean flag that will tell `ncp` to stop immediately if any
errors arise, rather than attempting to continue while logging errors.
If there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue.
## Programmatic usage
Programmatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error.
```javascript
var ncp = require('ncp').ncp;
ncp.limit = 16;
ncp(source, destination, function (err) {
if (err) {
return console.error(err);
}
console.log('done!');
});
```
You can also call ncp like `ncp(source, destination, options, callback)`.
`options` should be a dictionary. Currently, such options are available:
* `options.filter` - a `RegExp` instance, against which each file name is
tested to determine whether to copy it or not, or a function taking single
parameter: copied file name, returning `true` or `false`, determining
whether to copy file or not.
* `options.transform` - a function: `function (read, write) { read.pipe(write) }`
used to apply streaming transforms while copying.
* `options.clobber` - boolean=true. if set to false, `ncp` will not overwrite
destination files that already exist.
Please open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`.
@@ -0,0 +1,48 @@
#!/usr/bin/env node
var ncp = require('../lib/ncp'),
args = process.argv.slice(2),
source, dest;
if (args.length < 2) {
console.error('Usage: ncp [source] [destination] [--filter=filter] [--limit=concurrency limit]');
process.exit(1);
}
// parse arguments the hard way
function startsWith(str, prefix) {
return str.substr(0, prefix.length) == prefix;
}
var options = {};
args.forEach(function (arg) {
if (startsWith(arg, "--limit=")) {
options.limit = parseInt(arg.split('=', 2)[1], 10);
}
if (startsWith(arg, "--filter=")) {
options.filter = new RegExp(arg.split('=', 2)[1]);
}
if (startsWith(arg, "--stoponerr")) {
options.stopOnErr = true;
}
});
ncp.ncp(args[0], args[1], options, function (err) {
if (Array.isArray(err)) {
console.error('There were errors during the copy.');
err.forEach(function (err) {
console.error(err.stack || err.message);
});
process.exit(1);
}
else if (err) {
console.error('An error has occurred.');
console.error(err.stack || err.message);
process.exit(1);
}
});
@@ -0,0 +1,222 @@
var fs = require('fs'),
path = require('path');
module.exports = ncp
ncp.ncp = ncp
function ncp (source, dest, options, callback) {
if (!callback) {
callback = options;
options = {};
}
var basePath = process.cwd(),
currentPath = path.resolve(basePath, source),
targetPath = path.resolve(basePath, dest),
filter = options.filter,
transform = options.transform,
clobber = options.clobber !== false,
errs = null,
started = 0,
finished = 0,
running = 0,
limit = options.limit || ncp.limit || 16;
limit = (limit < 1) ? 1 : (limit > 512) ? 512 : limit;
startCopy(currentPath);
function startCopy(source) {
started++;
if (filter) {
if (filter instanceof RegExp) {
if (!filter.test(source)) {
return cb(true);
}
}
else if (typeof filter === 'function') {
if (!filter(source)) {
return cb(true);
}
}
}
return getStats(source);
}
function defer(fn) {
if (typeof(setImmediate) === 'function')
return setImmediate(fn);
return process.nextTick(fn);
}
function getStats(source) {
if (running >= limit) {
return defer(function () {
getStats(source);
});
}
running++;
fs.lstat(source, function (err, stats) {
var item = {};
if (err) {
return onError(err);
}
// We need to get the mode from the stats object and preserve it.
item.name = source;
item.mode = stats.mode;
if (stats.isDirectory()) {
return onDir(item);
}
else if (stats.isFile()) {
return onFile(item);
}
else if (stats.isSymbolicLink()) {
// Symlinks don't really need to know about the mode.
return onLink(source);
}
});
}
function onFile(file) {
var target = file.name.replace(currentPath, targetPath);
isWritable(target, function (writable) {
if (writable) {
return copyFile(file, target);
}
if(clobber)
rmFile(target, function () {
copyFile(file, target);
});
});
}
function copyFile(file, target) {
var readStream = fs.createReadStream(file.name),
writeStream = fs.createWriteStream(target, { mode: file.mode });
if(transform) {
transform(readStream, writeStream,file);
} else {
readStream.pipe(writeStream);
}
readStream.once('end', cb);
}
function rmFile(file, done) {
fs.unlink(file, function (err) {
if (err) {
return onError(err);
}
return done();
});
}
function onDir(dir) {
var target = dir.name.replace(currentPath, targetPath);
isWritable(target, function (writable) {
if (writable) {
return mkDir(dir, target);
}
copyDir(dir.name);
});
}
function mkDir(dir, target) {
fs.mkdir(target, dir.mode, function (err) {
if (err) {
return onError(err);
}
copyDir(dir.name);
});
}
function copyDir(dir) {
fs.readdir(dir, function (err, items) {
if (err) {
return onError(err);
}
items.forEach(function (item) {
startCopy(dir + '/' + item);
});
return cb();
});
}
function onLink(link) {
var target = link.replace(currentPath, targetPath);
fs.readlink(link, function (err, resolvedPath) {
if (err) {
return onError(err);
}
checkLink(resolvedPath, target);
});
}
function checkLink(resolvedPath, target) {
isWritable(target, function (writable) {
if (writable) {
return makeLink(resolvedPath, target);
}
fs.readlink(target, function (err, targetDest) {
if (err) {
return onError(err);
}
if (targetDest === resolvedPath) {
return cb();
}
return rmFile(target, function () {
makeLink(resolvedPath, target);
});
});
});
}
function makeLink(linkPath, target) {
fs.symlink(linkPath, target, function (err) {
if (err) {
return onError(err);
}
return cb();
});
}
function isWritable(path, done) {
fs.lstat(path, function (err, stats) {
if (err) {
if (err.code === 'ENOENT') return done(true);
return done(false);
}
return done(false);
});
}
function onError(err) {
if (options.stopOnError) {
return callback(err);
}
else if (!errs && options.errs) {
errs = fs.createWriteStream(options.errs);
}
else if (!errs) {
errs = [];
}
if (typeof errs.write === 'undefined') {
errs.push(err);
}
else {
errs.write(err.stack + '\n\n');
}
return cb();
}
function cb(skipped) {
if (!skipped) running--;
finished++;
if ((started === finished) && (running === 0)) {
return errs ? callback(errs) : callback(null);
}
}
};
@@ -0,0 +1,41 @@
{
"name": "ncp",
"version": "0.4.2",
"author": {
"name": "AvianFlu",
"email": "charlie@charlieistheman.com"
},
"description": "Asynchronous recursive file copy utility.",
"bin": {
"ncp": "./bin/ncp"
},
"devDependencies": {
"vows": "0.6.x",
"rimraf": "1.0.x",
"read-dir-files": "0.0.x"
},
"main": "./lib/ncp.js",
"repository": {
"type": "git",
"url": "https://github.com/AvianFlu/ncp.git"
},
"keywords": [
"cli",
"copy"
],
"license": "MIT",
"engine": {
"node": ">=0.4"
},
"scripts": {
"test": "vows --isolate --spec"
},
"readme": "# ncp - Asynchronous recursive file & directory copying\n\n[![Build Status](https://secure.travis-ci.org/AvianFlu/ncp.png)](http://travis-ci.org/AvianFlu/ncp)\n\nThink `cp -r`, but pure node, and asynchronous. `ncp` can be used both as a CLI tool and programmatically.\n\n## Command Line usage\n\nUsage is simple: `ncp [source] [dest] [--limit=concurrency limit]\n[--filter=filter] --stopOnErr`\n\nThe 'filter' is a Regular Expression - matched files will be copied.\n\nThe 'concurrency limit' is an integer that represents how many pending file system requests `ncp` has at a time.\n\n'stopOnErr' is a boolean flag that will tell `ncp` to stop immediately if any\nerrors arise, rather than attempting to continue while logging errors.\n\nIf there are no errors, `ncp` will output `done.` when complete. If there are errors, the error messages will be logged to `stdout` and to `./ncp-debug.log`, and the copy operation will attempt to continue.\n\n## Programmatic usage\n\nProgrammatic usage of `ncp` is just as simple. The only argument to the completion callback is a possible error. \n\n```javascript\nvar ncp = require('ncp').ncp;\n\nncp.limit = 16;\n\nncp(source, destination, function (err) {\n if (err) {\n return console.error(err);\n }\n console.log('done!');\n});\n```\n\nYou can also call ncp like `ncp(source, destination, options, callback)`. \n`options` should be a dictionary. Currently, such options are available:\n\n * `options.filter` - a `RegExp` instance, against which each file name is\n tested to determine whether to copy it or not, or a function taking single\n parameter: copied file name, returning `true` or `false`, determining\n whether to copy file or not.\n\n * `options.transform` - a function: `function (read, write) { read.pipe(write) }`\n used to apply streaming transforms while copying.\n\n * `options.clobber` - boolean=true. if set to false, `ncp` will not overwrite \n destination files that already exist.\n\nPlease open an issue if any bugs arise. As always, I accept (working) pull requests, and refunds are available at `/dev/null`.\n",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/AvianFlu/ncp/issues"
},
"homepage": "https://github.com/AvianFlu/ncp",
"_id": "ncp@0.4.2",
"_from": "ncp@~0.4.2"
}
Loaded 100 of 423 files, more files were not shown because too many files have changed in this diff. Show more