var data = this.input.map(function (file) {
self.log.debug({ file: file }, 'styleguide input file')
return "require('" + file + "')"
})
data = 'module.exports = [' + data.join(',') + ']'
Joining the array results in wrong escaping of windows path (C:\tmp\xyz becomes C:\tmp\xyz). Using slash solves this issue.
Fixing the example project
The example won't work since no styleguide components are found due to this command in package.json: rsg 'components/**/*.js'. The offending part for windows are the single quotes around components/**/*.js. Leaving them out or using double quotes solves this issue.
On Windows machines the generator fails badly.
Main Problem
Path problems in lib/rsg.js (l. 279-284):
Joining the array results in wrong escaping of windows path (C:\tmp\xyz becomes C:\tmp\xyz). Using slash solves this issue.
Fixing the example project
The example won't work since no styleguide components are found due to this command in package.json:
rsg 'components/**/*.js'
. The offending part for windows are the single quotes aroundcomponents/**/*.js
. Leaving them out or using double quotes solves this issue.