From 9f83006e5ad616a756e906004a497042e48d9c42 Mon Sep 17 00:00:00 2001 From: Faris Mustafa Date: Fri, 1 Sep 2017 17:59:03 -0700 Subject: [PATCH] expose node-elm-compiler processOpts --- elm-css.js | 3 ++- index.js | 13 +++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/elm-css.js b/elm-css.js index 2560c311..84c4af02 100755 --- a/elm-css.js +++ b/elm-css.js @@ -54,7 +54,8 @@ elmCss( program.output, program.module, program.port, - program.pathToMake + program.pathToMake, + {} ) .then(function(results) { console.log( diff --git a/index.js b/index.js index 3c15c07c..acb56c23 100644 --- a/index.js +++ b/index.js @@ -32,7 +32,7 @@ var KNOWN_MODULES = "Css" ]; -module.exports = function(projectDir, stylesheetsPath, outputDir, stylesheetsModule, stylesheetsPort, pathToMake) { +module.exports = function(projectDir, stylesheetsPath, outputDir, stylesheetsModule, stylesheetsPort, pathToMake, makeProcessOpts) { var originalWorkingDir = process.cwd(); process.chdir(projectDir); @@ -45,7 +45,8 @@ module.exports = function(projectDir, stylesheetsPath, outputDir, stylesheetsMod outputDir, stylesheetsModule || "Stylesheets", stylesheetsPort || "files", - pathToMake + pathToMake, + makeProcessOpts || {} ); }) .then(function(result) { @@ -70,14 +71,14 @@ function createTmpDir() { }); } -function generateCssFiles(stylesheetsPath, emitterDest, outputDir, stylesheetsModule, stylesheetsPort, pathToMake) { - return emit(stylesheetsPath, emitterDest, stylesheetsModule, stylesheetsPort, pathToMake) +function generateCssFiles(stylesheetsPath, emitterDest, outputDir, stylesheetsModule, stylesheetsPort, pathToMake, makeProcessOpts) { + return emit(stylesheetsPath, emitterDest, stylesheetsModule, stylesheetsPort, pathToMake, makeProcessOpts) .then(writeResults(outputDir)); } -function emit(src, dest, stylesheetsModule, stylesheetsPort, pathToMake) { +function emit(src, dest, stylesheetsModule, stylesheetsPort, pathToMake, makeProcessOpts) { // Compile the temporary file. - return compileEmitter(src, {output: dest, yes: true, pathToMake: pathToMake}) + return compileEmitter(src, {output: dest, yes: true, pathToMake: pathToMake, processOpts: makeProcessOpts}) .then(extractCssResults(dest, stylesheetsModule, stylesheetsPort)); }