Last active
December 31, 2015 12:19
-
-
Save h2non/7985698 to your computer and use it in GitHub Desktop.
styleguide absolute path issue fix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// origin source: https://github.com/indieisaconcept/grunt-styleguide/blob/master/tasks/styleguide.js#L221 | |
styleguide.files = { | |
file: file, | |
src: files.length > 0 && files || grunt.file.exists(file.orig.src) && file.orig.src, | |
dest: file.dest | |
}; | |
styleguide.files.base = (function () { | |
var base; | |
if (files.length) { | |
// note that it define the base path based only on the first existent path | |
if (grunt.file.isPathAbsolute(files[0])) { | |
base = path.dirname(files[0]); | |
} else { | |
base = helper.findBasePath(files) || './'; | |
} | |
} | |
return base || './'; | |
}()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment