broccoli-postcss
Advanced tools
Comparing version 1.0.0 to 1.1.0
14
index.js
@@ -7,9 +7,13 @@ var path = require('path'); | ||
function PostcssCompiler (inputFile, outputFile, plugins) { | ||
function PostcssCompiler (inputTrees, inputFile, outputFile, plugins) { | ||
if (!(this instanceof PostcssCompiler)) { | ||
return new PostcssCompiler(inputFile, outputFile, plugins); | ||
return new PostcssCompiler(inputTrees, inputFile, outputFile, plugins); | ||
} | ||
CachingWriter.call(this, inputFile); | ||
if (!Array.isArray(inputTrees)) { | ||
throw new Error('Expected array for first argument - did you mean [tree] instead of tree?'); | ||
} | ||
CachingWriter.call(this, inputTrees, inputFile); | ||
this.inputFile = inputFile; | ||
@@ -25,5 +29,5 @@ this.outputFile = outputFile; | ||
var toFilePath = path.join(destDir, this.outputFile); | ||
var fromFilePath = this.inputFile; | ||
var fromFilePath = path.join(includePaths[0], this.inputFile); | ||
if (!this.plugins || this.length < 1) { | ||
if (!this.plugins || this.plugins.length < 1) { | ||
throw new Error('You must provide at least 1 plugin in the plugin array'); | ||
@@ -30,0 +34,0 @@ } |
{ | ||
"name": "broccoli-postcss", | ||
"version": "1.0.0", | ||
"version": "1.1.0", | ||
"description": "Postcss compiler for Broccoli", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -19,2 +19,3 @@ # broccoli-postcss | ||
- **`inputTrees`**: An array of trees that specify the directories used by Broccoli. If you have a single tree, pass `[tree]`. | ||
- **`inputFile`**: Relative path of the main CSS file to process. | ||
@@ -21,0 +22,0 @@ - **`outputFile`** Relative path of the output CSS file. |
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
5307
6
41
41