broccoli-postcss
Advanced tools
Comparing version 2.0.0 to 2.1.0
# master | ||
# 2.1.0 | ||
* Writes a source map file when map property is present | ||
# 2.0.0 | ||
@@ -4,0 +8,0 @@ |
@@ -61,2 +61,6 @@ var path = require('path'); | ||
fs.writeFileSync(toFilePath, result.css); | ||
if (result.map) { | ||
fs.writeFileSync(toFilePath + '.map', result.map) | ||
} | ||
}) | ||
@@ -63,0 +67,0 @@ .catch(function (error) { |
{ | ||
"name": "broccoli-postcss", | ||
"version": "2.0.0", | ||
"version": "2.1.0", | ||
"description": "Postcss compiler for Broccoli", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -30,2 +30,3 @@ # broccoli-postcss | ||
```javascript | ||
/* Brocfile.js */ | ||
var compileCSS = require('broccoli-postcss'); | ||
@@ -44,2 +45,3 @@ var cssnext = require('cssnext'); | ||
var outputTree = compileCSS(['styles'], 'app.css', 'app.css', plugins, map); | ||
module.exports = outputTree; | ||
``` |
14
test.js
@@ -53,6 +53,9 @@ var assert = require('assert'); | ||
afterEach(function () { | ||
glob('tmp/*', function(er,files){ | ||
if(er) console.error(er) | ||
else async.forEach(files, rimraf) | ||
}) | ||
glob('tmp/*', function(err,files) { | ||
if (err) { | ||
console.error(er); | ||
} else { | ||
async.forEach(files, rimraf); | ||
} | ||
}); | ||
}); | ||
@@ -66,3 +69,6 @@ | ||
var content = fs.readFileSync(path.join(dir.directory, 'output.css'), 'utf8'); | ||
var sourceMap = JSON.parse(fs.readFileSync(path.join(dir.directory, 'output.css.map'), 'utf8')); | ||
assert.strictEqual(content.trim(), 'a:before { content: "test"; }'); | ||
assert.strictEqual(sourceMap.mappings, 'AAAA,WAAY,gBAAgB,EAAE'); | ||
assert.deepEqual(warnings, []); | ||
@@ -69,0 +75,0 @@ }); |
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
10117
163
46