Skip to content

Commit e540272

Browse files
devvaannshabose
authored andcommitted
refactor: update import statement to include module name
1 parent 9e708bd commit e540272

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

build/api-docs-generator.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,9 @@ function modifyMarkdown(content, relativePath) {
137137
path.basename(relativePath, '.md')
138138
).replace(/\\/g, '/');
139139

140-
const importStatement =
141-
`### Import :\n\`\`\`js\nbrackets.getModule("${modulePath}")\n\`\`\`\n\n`;
140+
const importStatement = '### Import :\n' +
141+
`\`\`\`js\nconst ${path.basename(relativePath, '.md')} = ` +
142+
`brackets.getModule("${modulePath}")\n\`\`\`\n\n`;
142143

143144
content = content.replace(/~/g, '.');
144145

0 commit comments

Comments
 (0)