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

autoprefixer

Package Overview
Dependencies
Maintainers
3
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

autoprefixer - npm Package Compare versions

Comparing version 6.5.4 to 6.6.0

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## 6.6 “Kaiyuan”
* Add `browserslist` key in `package.json` support.
* Add support for separated environments in browserslist config.
* Add `browserslist-stats.json` file support to load custom usage statistics.
## 6.5.4

@@ -2,0 +7,0 @@ * Fix unitless 0 basis in IE10/IE11 shorthand flex (by Google).

3

lib/autoprefixer.js

@@ -63,3 +63,4 @@ (function() {

prefixes = loadPrefixes({
from: (ref = css.source) != null ? ref.input.file : void 0
from: (ref = css.source) != null ? ref.input.file : void 0,
env: options.env
});

@@ -66,0 +67,0 @@ timeCapsule(result, prefixes);

@@ -43,6 +43,7 @@ (function() {

Browsers.prototype.parse = function(requirements) {
var ref;
var ref, ref1;
return browserslist(requirements, {
stats: this.stats,
path: (ref = this.options) != null ? ref.from : void 0,
stats: this.stats
env: (ref1 = this.options) != null ? ref1.env : void 0
});

@@ -49,0 +50,0 @@ };

{
"name": "autoprefixer",
"version": "6.5.4",
"version": "6.6.0",
"description": "Parse CSS and add vendor prefixes to CSS rules using values from the Can I Use website",

@@ -16,4 +16,4 @@ "keywords": [

"dependencies": {
"browserslist": "~1.4.0",
"caniuse-db": "^1.0.30000597",
"browserslist": "~1.5.1",
"caniuse-db": "^1.0.30000602",
"normalize-range": "^0.1.2",

@@ -37,3 +37,3 @@ "num2fraction": "^1.2.2",

"vinyl-source-stream": "^1.1.0",
"coffee-script": "1.12.1"
"coffee-script": "^1.12.2"
},

@@ -40,0 +40,0 @@ "scripts": {

@@ -129,10 +129,16 @@ # Autoprefixer [![Build Status][ci-img]][ci]

If you don’t provide the browsers option, Browserslist will try
to find the `browserslist` config in parent dirs.
The best way to provide browsers is `browserslist` config
or `package.json` with `browserslist` key. Put it in your project root.
We recommend to avoid Autoprefixer option and use `browserslist` config
or `package.json`. In this case browsers will be shared with other tools
like [babel-preset-env] or [Stylelint].
See [Browserslist docs] for queries, browser names, config format,
and default value.
[Browserslist docs]: https://github.com/ai/browserslist#queries
[babel-preset-env]: https://github.com/babel/babel-preset-env
[Browserslist]: https://github.com/ai/browserslist
[Browserslist docs]: https://github.com/ai/browserslist#queries
[Stylelint]: http://stylelint.io/

@@ -256,3 +262,3 @@ ## Outdated Prefixes

.pipe(sourcemaps.init())
.pipe(postcss([ autoprefixer({ browsers: ['last 2 versions'] }) ]))
.pipe(postcss([ autoprefixer() ]))
.pipe(sourcemaps.write('.'))

@@ -275,4 +281,2 @@ .pipe(gulp.dest('./dest'));

```js
var autoprefixer = require('autoprefixer');
module.exports = {

@@ -286,7 +290,16 @@ module: {

]
},
postcss: [ autoprefixer({ browsers: ['last 2 versions'] }) ]
}
}
```
And create a `postcss.config.js` with:
```js
module.exports = {
plugins: [
require('autoprefixer')
]
}
```
[other PostCSS plugins]: https://github.com/postcss/postcss#plugins

@@ -309,5 +322,3 @@ [postcss-loader]: https://github.com/postcss/postcss-loader

processors: [
require('autoprefixer')({
browsers: ['last 2 versions']
})
require('autoprefixer')
]

@@ -515,3 +526,3 @@ },

```js
var plugin = autoprefixer({ browsers: ['> 1%', 'IE 7'], cascade: false });
var plugin = autoprefixer({ cascade: false });
```

@@ -521,6 +532,8 @@

* `browsers` (array): list of browsers, which are supported in your project.
You can directly specify browser version (like `IE 7`) or use selections
(like `last 2 version` or `> 5%`). See [Browserslist docs] for available
* `browsers` (array): list of browsers query (like `last 2 version`),
which are supported in your project. We recommend to use `browserslist`
config or `browserslist` key in `package.json`, rather than this option
to share browsers with other tools.Wee [Browserslist docs] for available
queries and default value.
* `env` (string): environment for Browserslist.
* `cascade` (boolean): should Autoprefixer use Visual Cascade,

@@ -554,4 +567,4 @@ if CSS is uncompressed. Default: `true`

```js
var info = autoprefixer({ browsers: ['last 1 version'] }).info();
var info = autoprefixer().info();
console.log(info);
```
SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc