broccoli-postcss
Advanced tools
Comparing version 2.1.0 to 2.1.1
# master | ||
# 2.1.1 | ||
* Upgrades Broccoli Caching Writer to version 2. | ||
# 2.1.0 | ||
@@ -4,0 +8,0 @@ |
17
index.js
@@ -5,2 +5,3 @@ var path = require('path'); | ||
var assign = require("object-assign"); | ||
var includePathSearcher = require('include-path-searcher'); | ||
var CachingWriter = require('broccoli-caching-writer'); | ||
@@ -19,3 +20,3 @@ var postcss = require('postcss'); | ||
CachingWriter.call(this, inputTrees, inputFile); | ||
CachingWriter.call(this, Array.isArray(inputTrees) ? inputTrees : [inputTrees]); | ||
@@ -32,5 +33,5 @@ this.inputFile = inputFile; | ||
PostcssCompiler.prototype.updateCache = function (includePaths, destDir) { | ||
var toFilePath = path.join(destDir, this.outputFile); | ||
var fromFilePath = path.join(includePaths[0], this.inputFile); | ||
PostcssCompiler.prototype.build = function() { | ||
var toFilePath = this.outputPath + '/' + this.outputFile; | ||
var fromFilePath = includePathSearcher.findFileSync(this.inputFile, this.inputPaths); | ||
@@ -63,6 +64,10 @@ if ( !this.plugins || this.plugins.length < 1 ) { | ||
mkdirp.sync(path.dirname(toFilePath)); | ||
fs.writeFileSync(toFilePath, result.css); | ||
fs.writeFileSync(toFilePath, result.css, { | ||
encoding: 'utf8' | ||
}); | ||
if (result.map) { | ||
fs.writeFileSync(toFilePath + '.map', result.map) | ||
fs.writeFileSync(toFilePath + '.map', result.map, { | ||
encoding: 'utf8' | ||
}) | ||
} | ||
@@ -69,0 +74,0 @@ }) |
{ | ||
"name": "broccoli-postcss", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "Postcss compiler for Broccoli", | ||
@@ -26,3 +26,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"broccoli-caching-writer": "^0.5.5", | ||
"broccoli-caching-writer": "^2.1.0", | ||
"include-path-searcher": "0.1.0", | ||
"mkdirp": "^0.5.0", | ||
@@ -29,0 +30,0 @@ "object-assign": "^3.0.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
10409
168
5
+ Addedinclude-path-searcher@0.1.0
+ Addedbroccoli-caching-writer@2.3.1(transitive)
+ Addedbroccoli-plugin@1.1.0(transitive)
+ Addedensure-posix-path@1.1.1(transitive)
+ Addedinclude-path-searcher@0.1.0(transitive)
+ Addedmatcher-collection@1.1.2(transitive)
+ Addedwalk-sync@0.2.7(transitive)
- Removedbroccoli-caching-writer@0.5.5(transitive)
- Removedcore-object@0.0.3(transitive)
- Removedlodash-node@2.4.1(transitive)