Skip to content

Commit f0ed1d7

Browse files
authored
Merge pull request #159 from ember-learn/module-links
Fix links to module items and provide sample docs
2 parents ea24229 + c26baba commit f0ed1d7

File tree

3 files changed

+39
-1
lines changed

3 files changed

+39
-1
lines changed

lib/broccoli/docs-compiler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ function generateModuleNavigationItems(modules, type) {
180180
let navItems = modules.reduce((navItems, m) => {
181181
let items = m[type].map((item) => {
182182
return {
183-
path: `root/${item.id || module.id}`,
183+
path: `root/${item.id || m.id}`,
184184
name: item.name,
185185
isDefault: item.exportType === 'default'
186186
};

sandbox/app/utils/esdoc-module.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/** @documenter esdoc */
2+
3+
/**
4+
* A first-class greeting for the people.
5+
*
6+
* @type {string}
7+
*/
8+
export const GREETING = 'Hello';
9+
10+
/**
11+
* Greet whoever you like!
12+
*
13+
* @param {string} subject The target of your greeting
14+
* @return {string} A hand-crafted artisanal greeting just for your subject
15+
*/
16+
export function greet(subject = 'World') {
17+
return `${GREETING}, ${subject}!`;
18+
}

sandbox/app/utils/yuidoc-module.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/** @documenter yuidoc */
2+
3+
/**
4+
* A first-class greeting for the people.
5+
*
6+
* @constant GREETING
7+
* @type {string}
8+
*/
9+
export const GREETING = 'Hello';
10+
11+
/**
12+
* Greet whoever you like!
13+
*
14+
* @function greet
15+
* @param {string} subject The target of your greeting
16+
* @return {string} A hand-crafted artisanal greeting just for your subject
17+
*/
18+
export function greet(subject = 'World') {
19+
return `${GREETING}, ${subject}!`;
20+
}

0 commit comments

Comments
 (0)