diff --git a/lib/nsg.js b/lib/nsg.js index 97e5f4f..ee36bfd 100644 --- a/lib/nsg.js +++ b/lib/nsg.js @@ -13,7 +13,6 @@ var Promise = require('bluebird'), providedLayouts = require('./layout'), providedCompositors = require('./compositor'), providedStylesheets = require('./stylesheet'), - templatedStylesheet = require('./stylesheet/templatedStylesheet'), isNotNull = R.complement(R.isNil), MAX_PARALLEL_FILE_READS = 80, defaultOptions = { @@ -66,7 +65,7 @@ function generateSprite(userOptions, callback) { compositor = R.propOr(options.compositor, options.compositor, providedCompositors), renderStylesheet = R.cond([ [ R.both(R.is(String), R.has(R.__, providedStylesheets)), R.prop(R.__, providedStylesheets) ], - [ R.is(String), templatedStylesheet ], + [ R.is(String), providedStylesheets.readTemplatedStylesheetFromFile ], [ R.T, R.identity ] ])(options.stylesheet), readImage = R.propOr(null, 'readImage', compositor), diff --git a/lib/stylesheet/index.js b/lib/stylesheet/index.js index aa58eb4..2147e95 100644 --- a/lib/stylesheet/index.js +++ b/lib/stylesheet/index.js @@ -15,5 +15,6 @@ module.exports = { 'prefixed-css': require('./prefixed-css'), sass: readTemplatedStylesheetFromFile(path.join(__dirname, '/templates/sass.tpl')), scss: readTemplatedStylesheetFromFile(path.join(__dirname, '/templates/scss.tpl')), - stylus: readTemplatedStylesheetFromFile(path.join(__dirname, '/templates/stylus.tpl')) -}; \ No newline at end of file + stylus: readTemplatedStylesheetFromFile(path.join(__dirname, '/templates/stylus.tpl')), + readTemplatedStylesheetFromFile: readTemplatedStylesheetFromFile +}; diff --git a/lib/utils/stylesheet.js b/lib/utils/stylesheet.js index fa5680b..7280b91 100644 --- a/lib/utils/stylesheet.js +++ b/lib/utils/stylesheet.js @@ -59,7 +59,7 @@ module.exports = { } return R.evolve({ - stylesheetOptions: R.merge(R.__, { spritePath: relativePath }) + stylesheetOptions: R.merge({ spritePath: relativePath }, R.__) }, options); } };