broccoli-autoprefixer
Advanced tools
Comparing version 0.3.0 to 0.4.0
11
index.js
'use strict'; | ||
var Filter = require('broccoli-filter'); | ||
var autoprefixer = require('autoprefixer'); | ||
var objectAssign = require('object-assign'); | ||
@@ -20,6 +21,12 @@ function AutoprefixerFilter(inputTree, options) { | ||
AutoprefixerFilter.prototype.processString = function (str) { | ||
return autoprefixer.apply(autoprefixer, this.options.browsers).process(str, this.options).css; | ||
AutoprefixerFilter.prototype.processString = function (str, relativePath) { | ||
var opts = objectAssign({}, this.options, { | ||
map: this.options.sourcemap ? 'inline' : false, | ||
from: relativePath, | ||
to: relativePath | ||
}); | ||
return autoprefixer(opts.browsers).process(str, opts).css; | ||
}; | ||
module.exports = AutoprefixerFilter; |
{ | ||
"name": "broccoli-autoprefixer", | ||
"version": "0.3.0", | ||
"version": "0.4.0", | ||
"description": "Prefix CSS using Autoprefixer", | ||
@@ -30,3 +30,4 @@ "license": "MIT", | ||
"autoprefixer": "^2.2.0", | ||
"broccoli-filter": "^0.1.6" | ||
"broccoli-filter": "^0.1.6", | ||
"object-assign": "^0.3.1" | ||
}, | ||
@@ -33,0 +34,0 @@ "devDependencies": { |
@@ -38,5 +38,18 @@ # [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) | ||
#### sourcemap | ||
Type: `Boolean` | ||
Default: `true` if the input has a sourcemap, otherwise `false` | ||
Set to `true` to include a base64-encoded sourcemap at the end of the output. | ||
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). | ||
## License | ||
[MIT](http://opensource.org/licenses/MIT) © [Sindre Sorhus](http://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
3248
24
55
3
+ Addedobject-assign@^0.3.1
+ Addedobject-assign@0.3.1(transitive)