From 25cb268800d753830ac3cd12b836b7d7514406a6 Mon Sep 17 00:00:00 2001 From: Fabian Gander Date: Sun, 16 Dec 2018 04:36:34 +0100 Subject: [PATCH] Improved baseDir handling within options, so it doesn't go out to the package.json directory. (#57) Assets can now be in any location, the baseDir option allows to improve the path of copied assets, especially if assets are not based on root path --- src/stylemark.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stylemark.js b/src/stylemark.js index b6fd90d..a3a486f 100644 --- a/src/stylemark.js +++ b/src/stylemark.js @@ -32,7 +32,7 @@ function generate(params) { options.output = output; options.match = options.match || defaultMatchExtensions; options.excludeDir = defaultExcludeDirectories.concat(options.excludeDir); - options.baseDir = options.baseDir ? findRoot(path.resolve(options.baseDir)) : findRoot(configPath); + options.baseDir = options.baseDir ? path.resolve(options.baseDir) : findRoot(configPath); ['match', 'excludeDir'].forEach(name => { options[name] = _.isString(options[name]) ? new RegExp(options[name]) : options[name];