broccoli-autoprefixer
Advanced tools
Comparing version 4.1.0 to 5.0.0
22
index.js
'use strict'; | ||
var Filter = require('broccoli-persistent-filter'); | ||
var objectAssign = require('object-assign'); | ||
var postcss = require('postcss'); | ||
var autoprefixer = require('autoprefixer'); | ||
const Filter = require('broccoli-persistent-filter'); | ||
const postcss = require('postcss'); | ||
const autoprefixer = require('autoprefixer'); | ||
function AutoprefixerFilter(inputTree, _options) { | ||
var options = _options || {}; | ||
const options = _options || {}; | ||
if (!(this instanceof AutoprefixerFilter)) { | ||
@@ -26,3 +26,3 @@ return new AutoprefixerFilter(inputTree, _options); | ||
AutoprefixerFilter.prototype.processString = function (str, relativePath) { | ||
var opts = objectAssign({ | ||
const opts = Object.assign({ | ||
from: relativePath, | ||
@@ -32,3 +32,3 @@ to: relativePath | ||
// support explicit override of inline sourcemaps | ||
// Support explicit override of inline sourcemaps | ||
if (opts.sourcemap !== null || opts.sourcemap !== undefined) { | ||
@@ -40,4 +40,4 @@ opts.map = opts.sourcemap ? 'inline' : false; | ||
.process(str, opts) | ||
.then(function (result) { | ||
var warnings = result.warnings(); | ||
.then(result => { | ||
const warnings = result.warnings(); | ||
@@ -50,5 +50,5 @@ if (warnings.length > 0) { | ||
}) | ||
.catch(function (err) { | ||
.catch(err => { | ||
if (err.name === 'CssSyntaxError') { | ||
// TODO: find a way to hide the stack so to adhere to the PostCSS guidelines | ||
// TODO: Find a way to hide the stack so to adhere to the PostCSS guidelines | ||
err.message += err.showSourceCode(); | ||
@@ -55,0 +55,0 @@ } |
{ | ||
"name": "broccoli-autoprefixer", | ||
"version": "4.1.0", | ||
"version": "5.0.0", | ||
"description": "Prefix CSS using Autoprefixer", | ||
@@ -13,6 +13,6 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=0.12.0" | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && broccoli build temp && mocha" | ||
"test": "xo && broccoli build temp && ava" | ||
}, | ||
@@ -34,14 +34,13 @@ "files": [ | ||
"dependencies": { | ||
"autoprefixer": "^6.0.0", | ||
"autoprefixer": "^7.0.0", | ||
"broccoli-persistent-filter": "^1.1.6", | ||
"object-assign": "^4.0.1", | ||
"postcss": "^5.0.4" | ||
"postcss": "^6.0.1" | ||
}, | ||
"devDependencies": { | ||
"broccoli": "^0.16.3", | ||
"ava": "*", | ||
"broccoli": "^1.1.1", | ||
"broccoli-cli": "^1.0.0", | ||
"mocha": "*", | ||
"rimraf": "^2.2.6", | ||
"del": "^2.2.2", | ||
"xo": "*" | ||
} | ||
} |
@@ -18,3 +18,3 @@ # [broccoli](https://github.com/joliss/broccoli)-autoprefixer [![Build Status](https://travis-ci.org/sindresorhus/broccoli-autoprefixer.svg?branch=master)](https://travis-ci.org/sindresorhus/broccoli-autoprefixer) | ||
```js | ||
var autoprefixer = require('broccoli-autoprefixer'); | ||
const autoprefixer = require('broccoli-autoprefixer'); | ||
tree = autoprefixer(tree, options); | ||
@@ -30,2 +30,4 @@ ``` | ||
Type: `Object` | ||
See the Autoprefixer [options](https://github.com/postcss/autoprefixer#options). | ||
@@ -37,3 +39,3 @@ | ||
Type: `boolean` | ||
Type: `boolean`<br> | ||
Default: `true` if the input has a sourcemap, otherwise `false` | ||
@@ -43,8 +45,5 @@ | ||
If a sourcemap already exists in the input, Autoprefixer will automatically | ||
include an updated sourcemap in the output. Set this value to `false` to | ||
strip out the sourcemap entirely. | ||
If a sourcemap already exists in the input, Autoprefixer will automatically include an updated sourcemap in the output. Set this value to `false` to strip out the sourcemap entirely. | ||
If you'd like to extract the inline sourcemap from the output, consider using a | ||
tool like [broccoli-source-map](https://github.com/myfreeweb/broccoli-source-map). | ||
If you'd like to extract the inline sourcemap from the output, consider using a tool like [`broccoli-source-map`](https://github.com/myfreeweb/broccoli-source-map). | ||
@@ -54,2 +53,2 @@ | ||
MIT © [Sindre Sorhus](http://sindresorhus.com) | ||
MIT © [Sindre Sorhus](https://sindresorhus.com) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3
0
4858
44
50
+ Addedansi-styles@3.2.1(transitive)
+ Addedautoprefixer@7.2.6(transitive)
+ Addedbrowserslist@2.11.3(transitive)
+ Addedcaniuse-lite@1.0.30001690(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedpostcss@6.0.23(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedsupports-color@5.5.0(transitive)
- Removedobject-assign@^4.0.1
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedautoprefixer@6.7.7(transitive)
- Removedbrowserslist@1.7.7(transitive)
- Removedcaniuse-db@1.0.30001690(transitive)
- Removedchalk@1.1.3(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhas-flag@1.0.0(transitive)
- Removedjs-base64@2.6.4(transitive)
- Removedpostcss@5.2.18(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.03.2.3(transitive)
Updatedautoprefixer@^7.0.0
Updatedpostcss@^6.0.1