Skip to content

Commit

Permalink
Fix documentation edit links
Browse files Browse the repository at this point in the history
  • Loading branch information
emccorson committed May 9, 2022
1 parent d365357 commit 112c4a1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions modules/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,28 +338,28 @@ module.exports = function() {


if (framework === 'react') {
const path = 'bindings/react/src/components';
const path = 'react-onsenui/src/components';
const reactName = this.kebabCaseToUpperCamelCase(this.removeOnsPrefix(component));

return `${editUrl}/${path}/${reactName}.jsx`;

} else if (framework === 'vue' && attribute && attribute.extensionOf === 'vue') {
const path = 'bindings/vue/src/docs';
const path = 'vue-onsenui/src/docs';
const vueName = 'V' + this.kebabCaseToUpperCamelCase((component));

return `${editUrl}/${path}/${vueName}.wcdoc`;

} else if (component.startsWith('ons.')) {
const path = 'core/src/ons';
const path = 'onsenui/esm/ons';
const filename = this.camelCaseToKebabCase(component.slice(4));

return `${editUrl}/${path}/${filename}.js`;

} else if (component === 'ons') {
return `${editUrl}/core/src/ons/index.js`;
return `${editUrl}/onsenui/esm/ons/index.js`;

} else {
const path = 'core/src/elements';
const path = 'onsenui/esm/elements';
const localPath = `./dist/v2/OnsenUI/${path}`;

if (fs.existsSync(`${localPath}/${component}.js`)) {
Expand Down

0 comments on commit 112c4a1

Please sign in to comment.