Skip to content

Commit aa265eb

Browse files
author
Gitlab-CI
committed
fix(jsdom): remove sed fix and using updateExample in react-styleguidist configuration
1 parent e831499 commit aa265eb

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -350,4 +350,4 @@
350350
},
351351
"declinationId": "bs",
352352
"contributors": []
353-
}
353+
}

src/cli/jsdoc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,5 @@ else
3535
--access public \
3636
"$@"
3737

38-
# this is necessary otherwise it can't work with react-styleguidist
39-
sed -i "s/\`\`\`javascript/\`\`\`js static/g" $output
4038
fi
4139
exit 0

src/createConfig.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,14 @@ export function createConfig(config = {}, options = {}) {
382382
name = name === 'index' ? basename(dir) : name;
383383
return `import ${name} from '${pkg.name}/${dir.replace(/^src\//, 'lib/')}';`;
384384
},
385+
// this is useful for markdown generated with documentationjs
386+
updateExample(props) {
387+
const { settings, lang } = props;
388+
if (lang === 'javascript') {
389+
settings.static = true;
390+
}
391+
return props;
392+
},
385393
template: ({
386394
css,
387395
js,

0 commit comments

Comments
 (0)