Skip to content

Commit ffbf8b0

Browse files
committed
fix windows specID definition
1 parent e6ec4cc commit ffbf8b0

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

loaders/styleguide.loader.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,13 @@ module.exports.pitch = function() {
3939
console.log();
4040
}
4141

42-
var specPah;
42+
var specPath;
4343
var specId;
4444
var components = componentSources.map(function(item){
45-
specPah = config.getExampleFilename(item);
46-
specId = path.dirname(specPah.replace(global.userPath, '')).replace(/^\//, '').toLowerCase();
45+
specPath = config.getExampleFilename(item);
46+
47+
specId = path.dirname(specPath.replace(global.userPath, '')).replace(/\\/g, '/');
48+
specId = specId.replace(/^\//, '').toLowerCase();
4749

4850
return '"' + specId + '":' + processComponent(item);
4951
});

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "sourcejs-react-styleguidist",
33
"description": "SourceJS integration plugin for react-styleuguidist",
4-
"version": "0.3.1",
4+
"version": "0.3.2",
55
"homepage": "https://github.com/sourcejs/sourcejs-react-styleguidist",
66
"contributirs": [
77
{

0 commit comments

Comments
 (0)