@docfy/ember 0.4.8 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/helpers/docfy-eq.d.ts +5 -1
- package/lib/index.js +6 -6
- package/lib/plugins/extract-demos-to-components.js +11 -12
- package/lib/plugins/preview-template.js +6 -6
- package/lib/plugins/replace-internal-links-with-docfy-link.js +4 -4
- package/lib/plugins/utils.js +9 -9
- package/package.json +58 -45
- package/src/plugins/extract-demos-to-components.ts +3 -2
- package/tsconfig.json +1 -0
package/helpers/docfy-eq.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export declare function docfyEq(params: unknown[]): boolean;
|
|
2
|
-
declare const _default:
|
|
2
|
+
declare const _default: import("@ember/component/helper").FunctionBasedHelper<{
|
|
3
|
+
PositionalArgs: unknown[];
|
|
4
|
+
NamedArgs: Record<string, unknown>;
|
|
5
|
+
Return: boolean;
|
|
6
|
+
}>;
|
|
3
7
|
export default _default;
|
package/lib/index.js
CHANGED
|
@@ -26,7 +26,7 @@ const get_config_1 = __importDefault(require("./get-config"));
|
|
|
26
26
|
const utils_1 = require("./plugins/utils");
|
|
27
27
|
const calculate_cache_key_for_tree_1 = __importDefault(require("calculate-cache-key-for-tree"));
|
|
28
28
|
const debug_1 = __importDefault(require("debug"));
|
|
29
|
-
const debug = debug_1.default('@docfy/ember');
|
|
29
|
+
const debug = (0, debug_1.default)('@docfy/ember');
|
|
30
30
|
const templateOnlyComponent = `
|
|
31
31
|
import Component from '@glimmer/component';
|
|
32
32
|
export default class extends Component {}
|
|
@@ -72,7 +72,7 @@ class DocfyBroccoli extends broccoli_plugin_1.default {
|
|
|
72
72
|
ensureDirectoryExistence(fileName);
|
|
73
73
|
fs_1.default.writeFileSync(fileName, page.rendered);
|
|
74
74
|
const demoComponents = page.pluginData.demoComponents;
|
|
75
|
-
if (utils_1.isDemoComponents(demoComponents)) {
|
|
75
|
+
if ((0, utils_1.isDemoComponents)(demoComponents)) {
|
|
76
76
|
demoComponents.forEach((component) => {
|
|
77
77
|
component.chunks.forEach((chunk) => {
|
|
78
78
|
const chunkPath = path_1.default.join(this.outputPath, 'components', `${component.name.dashCase}.${chunk.ext}`);
|
|
@@ -104,7 +104,7 @@ module.exports = {
|
|
|
104
104
|
docfyConfig: undefined,
|
|
105
105
|
included(...args) {
|
|
106
106
|
if (!isDeepAddonInstance(this)) {
|
|
107
|
-
this.docfyConfig = get_config_1.default(this.project.root);
|
|
107
|
+
this.docfyConfig = (0, get_config_1.default)(this.project.root);
|
|
108
108
|
this.bridge = new broccoli_bridge_1.default();
|
|
109
109
|
}
|
|
110
110
|
this._super.included.apply(this, args);
|
|
@@ -115,10 +115,10 @@ module.exports = {
|
|
|
115
115
|
switch (treeType) {
|
|
116
116
|
case 'app':
|
|
117
117
|
case 'addon': {
|
|
118
|
-
return calculate_cache_key_for_tree_1.default(treeType, this, [this.docfyConfig]);
|
|
118
|
+
return (0, calculate_cache_key_for_tree_1.default)(treeType, this, [this.docfyConfig]);
|
|
119
119
|
}
|
|
120
120
|
default:
|
|
121
|
-
return calculate_cache_key_for_tree_1.default(treeType, this);
|
|
121
|
+
return (0, calculate_cache_key_for_tree_1.default)(treeType, this);
|
|
122
122
|
}
|
|
123
123
|
},
|
|
124
124
|
treeForApp(tree) {
|
|
@@ -144,7 +144,7 @@ module.exports = {
|
|
|
144
144
|
}
|
|
145
145
|
const EmberApp = require('ember-cli/lib/broccoli/ember-app'); // eslint-disable-line
|
|
146
146
|
const modulePrefix = this.project.config(EmberApp.env()).modulePrefix;
|
|
147
|
-
trees.push(new broccoli_file_creator_1.default('output.js', docfy_output_template_1.default(modulePrefix)));
|
|
147
|
+
trees.push(new broccoli_file_creator_1.default('output.js', (0, docfy_output_template_1.default)(modulePrefix)));
|
|
148
148
|
return new broccoli_merge_trees_1.default(trees);
|
|
149
149
|
},
|
|
150
150
|
treeForPublic() {
|
|
@@ -18,8 +18,7 @@ const path_1 = __importDefault(require("path"));
|
|
|
18
18
|
* This is necessary for apps using remark-autolink-headings, for example.
|
|
19
19
|
*/
|
|
20
20
|
function createHeading(ctx) {
|
|
21
|
-
const heading = ctx.remark.runSync(ctx.remark.parse('## Examples'))
|
|
22
|
-
.children[0];
|
|
21
|
+
const heading = ctx.remark.runSync(ctx.remark.parse('## Examples')).children[0];
|
|
23
22
|
heading.depth = 2;
|
|
24
23
|
return heading;
|
|
25
24
|
}
|
|
@@ -28,7 +27,7 @@ function createHeading(ctx) {
|
|
|
28
27
|
*/
|
|
29
28
|
function insertDemoNodesIntoPage(page, toInsert) {
|
|
30
29
|
if (Array.isArray(page.ast.children)) {
|
|
31
|
-
const secondHeading = unist_util_find_1.default(page.ast, (node) => node.type === 'heading' && node.depth !== 1);
|
|
30
|
+
const secondHeading = (0, unist_util_find_1.default)(page.ast, (node) => node.type === 'heading' && node.depth !== 1);
|
|
32
31
|
if (secondHeading) {
|
|
33
32
|
const index = page.ast.children.findIndex((el) => el === secondHeading);
|
|
34
33
|
page.ast.children.splice(index, 0, ...toInsert);
|
|
@@ -38,7 +37,7 @@ function insertDemoNodesIntoPage(page, toInsert) {
|
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
|
-
exports.default = plugin_1.default({
|
|
40
|
+
exports.default = (0, plugin_1.default)({
|
|
42
41
|
runWithMdast(ctx) {
|
|
43
42
|
const seenNames = new Set();
|
|
44
43
|
ctx.pages.forEach((page) => {
|
|
@@ -46,12 +45,12 @@ exports.default = plugin_1.default({
|
|
|
46
45
|
const demoComponents = [];
|
|
47
46
|
page.demos.forEach((demo) => {
|
|
48
47
|
const chunks = [];
|
|
49
|
-
unist_util_visit_1.default(demo.ast, 'code', (node) => {
|
|
48
|
+
(0, unist_util_visit_1.default)(demo.ast, 'code', (node) => {
|
|
50
49
|
if (['component', 'template', 'styles'].includes(node.meta || '')) {
|
|
51
50
|
chunks.push({
|
|
52
51
|
snippet: node,
|
|
53
52
|
code: node.value.replace(/\\{{/g, '{{'),
|
|
54
|
-
ext: utils_1.getExt(node.lang || (node.meta === 'template' ? 'hbs' : 'js')),
|
|
53
|
+
ext: (0, utils_1.getExt)(node.lang || (node.meta === 'template' ? 'hbs' : 'js')),
|
|
55
54
|
type: node.meta
|
|
56
55
|
});
|
|
57
56
|
}
|
|
@@ -59,8 +58,8 @@ exports.default = plugin_1.default({
|
|
|
59
58
|
// 1. exclude extension
|
|
60
59
|
// 2. remove /index.md because of web conventions
|
|
61
60
|
const baseName = page.source.replace('/index.md', '').split('.')[0];
|
|
62
|
-
const componentName = utils_1.generateDemoComponentName(`docfy-demo-${baseName}-${path_1.default.basename(demo.source).split('.')[0]}`, seenNames);
|
|
63
|
-
const demoTitle = unist_util_find_1.default(demo.ast, (node) => node.type === 'heading' && node.depth === 1);
|
|
61
|
+
const componentName = (0, utils_1.generateDemoComponentName)(`docfy-demo-${baseName}-${path_1.default.basename(demo.source).split('.')[0]}`, seenNames);
|
|
62
|
+
const demoTitle = (0, unist_util_find_1.default)(demo.ast, (node) => node.type === 'heading' && node.depth === 1);
|
|
64
63
|
if (demoTitle) {
|
|
65
64
|
demoTitle.depth = 3;
|
|
66
65
|
demoTitle.data = Object.assign(Object.assign({}, (demoTitle.data || {})), { id: componentName.dashCase, docfyDelete: true // mark the heading to be deleted by @docfy/core TOC plugin
|
|
@@ -70,22 +69,22 @@ exports.default = plugin_1.default({
|
|
|
70
69
|
name: componentName,
|
|
71
70
|
chunks,
|
|
72
71
|
description: {
|
|
73
|
-
title: demoTitle ? mdast_util_to_string_1.default(demoTitle) : undefined,
|
|
72
|
+
title: demoTitle ? (0, mdast_util_to_string_1.default)(demoTitle) : undefined,
|
|
74
73
|
ast: demo.ast,
|
|
75
74
|
editUrl: demo.meta.editUrl
|
|
76
75
|
}
|
|
77
76
|
});
|
|
78
77
|
// Delete used code blocks
|
|
79
78
|
chunks.forEach(({ snippet }) => {
|
|
80
|
-
utils_1.deleteNode(demo.ast.children, snippet);
|
|
79
|
+
(0, utils_1.deleteNode)(demo.ast.children, snippet);
|
|
81
80
|
});
|
|
82
81
|
});
|
|
83
82
|
const toInsert = [createHeading(ctx)];
|
|
84
83
|
demoComponents.forEach((component) => {
|
|
85
|
-
toInsert.push(...utils_1.createDemoNodes(component));
|
|
84
|
+
toInsert.push(...(0, utils_1.createDemoNodes)(component));
|
|
86
85
|
});
|
|
87
86
|
insertDemoNodesIntoPage(page, toInsert);
|
|
88
|
-
if (utils_1.isDemoComponents(page.pluginData.demoComponents)) {
|
|
87
|
+
if ((0, utils_1.isDemoComponents)(page.pluginData.demoComponents)) {
|
|
89
88
|
page.pluginData.demoComponents.push(...demoComponents);
|
|
90
89
|
}
|
|
91
90
|
else {
|
|
@@ -7,20 +7,20 @@ const unist_util_visit_1 = __importDefault(require("unist-util-visit"));
|
|
|
7
7
|
const plugin_1 = __importDefault(require("@docfy/core/lib/plugin"));
|
|
8
8
|
const utils_1 = require("./utils");
|
|
9
9
|
const path_1 = __importDefault(require("path"));
|
|
10
|
-
exports.default = plugin_1.default({
|
|
10
|
+
exports.default = (0, plugin_1.default)({
|
|
11
11
|
runWithMdast(ctx) {
|
|
12
12
|
const seenNames = new Set();
|
|
13
13
|
ctx.pages.forEach((page) => {
|
|
14
14
|
const demoComponents = [];
|
|
15
|
-
unist_util_visit_1.default(page.ast, 'code', (node) => {
|
|
15
|
+
(0, unist_util_visit_1.default)(page.ast, 'code', (node) => {
|
|
16
16
|
if (['preview-template'].includes(node.meta || '')) {
|
|
17
17
|
demoComponents.push({
|
|
18
|
-
name: utils_1.generateDemoComponentName(`docfy-demo-preview-${path_1.default.basename(page.meta.url)}`, seenNames),
|
|
18
|
+
name: (0, utils_1.generateDemoComponentName)(`docfy-demo-preview-${path_1.default.basename(page.meta.url)}`, seenNames),
|
|
19
19
|
chunks: [
|
|
20
20
|
{
|
|
21
21
|
snippet: node,
|
|
22
22
|
code: node.value.replace(/\\{{/g, '{{'),
|
|
23
|
-
ext: utils_1.getExt(node.lang || 'hbs'),
|
|
23
|
+
ext: (0, utils_1.getExt)(node.lang || 'hbs'),
|
|
24
24
|
type: node.meta
|
|
25
25
|
}
|
|
26
26
|
]
|
|
@@ -28,9 +28,9 @@ exports.default = plugin_1.default({
|
|
|
28
28
|
}
|
|
29
29
|
});
|
|
30
30
|
demoComponents.forEach((demoComponent) => {
|
|
31
|
-
utils_1.replaceNode(page.ast.children, demoComponent.chunks[0].snippet, ...utils_1.createDemoNodes(demoComponent));
|
|
31
|
+
(0, utils_1.replaceNode)(page.ast.children, demoComponent.chunks[0].snippet, ...(0, utils_1.createDemoNodes)(demoComponent));
|
|
32
32
|
});
|
|
33
|
-
if (utils_1.isDemoComponents(page.pluginData.demoComponents)) {
|
|
33
|
+
if ((0, utils_1.isDemoComponents)(page.pluginData.demoComponents)) {
|
|
34
34
|
page.pluginData.demoComponents.push(...demoComponents);
|
|
35
35
|
}
|
|
36
36
|
else {
|
|
@@ -7,7 +7,7 @@ const plugin_1 = __importDefault(require("@docfy/core/lib/plugin"));
|
|
|
7
7
|
const unist_util_visit_1 = __importDefault(require("unist-util-visit"));
|
|
8
8
|
const unist_builder_1 = __importDefault(require("unist-builder"));
|
|
9
9
|
function visitor(page) {
|
|
10
|
-
unist_util_visit_1.default(page.ast, 'link', (node, index, parent) => {
|
|
10
|
+
(0, unist_util_visit_1.default)(page.ast, 'link', (node, index, parent) => {
|
|
11
11
|
if (node.url[0] === '/') {
|
|
12
12
|
const data = node.data || (node.data = {});
|
|
13
13
|
const props = (data.hProperties || (data.hProperties = {}));
|
|
@@ -18,9 +18,9 @@ function visitor(page) {
|
|
|
18
18
|
})
|
|
19
19
|
.join(' ');
|
|
20
20
|
const toInsert = [
|
|
21
|
-
unist_builder_1.default('html', `<DocfyLink @to="${urlParts[0]}" ${urlParts[1] ? `@anchor="${urlParts[1]}"` : ''} ${attributes}>`),
|
|
21
|
+
(0, unist_builder_1.default)('html', `<DocfyLink @to="${urlParts[0]}" ${urlParts[1] ? `@anchor="${urlParts[1]}"` : ''} ${attributes}>`),
|
|
22
22
|
...node.children,
|
|
23
|
-
unist_builder_1.default('html', `</DocfyLink>`)
|
|
23
|
+
(0, unist_builder_1.default)('html', `</DocfyLink>`)
|
|
24
24
|
];
|
|
25
25
|
parent === null || parent === void 0 ? void 0 : parent.children.splice(index, 1, ...toInsert);
|
|
26
26
|
}
|
|
@@ -30,7 +30,7 @@ function visitor(page) {
|
|
|
30
30
|
* This function finds all the links starting with an `/` and replace them with
|
|
31
31
|
* the `DocfyLink` component.
|
|
32
32
|
*/
|
|
33
|
-
exports.default = plugin_1.default({
|
|
33
|
+
exports.default = (0, plugin_1.default)({
|
|
34
34
|
runWithMdast(ctx) {
|
|
35
35
|
ctx.pages.forEach((page) => {
|
|
36
36
|
visitor(page);
|
package/lib/plugins/utils.js
CHANGED
|
@@ -27,30 +27,30 @@ const unist_builder_1 = __importDefault(require("unist-builder"));
|
|
|
27
27
|
*/
|
|
28
28
|
function createDemoNodes(component) {
|
|
29
29
|
const nodes = [
|
|
30
|
-
unist_builder_1.default('html', `<DocfyDemo @id="${component.name.dashCase}" as |demo|>`)
|
|
30
|
+
(0, unist_builder_1.default)('html', `<DocfyDemo @id="${component.name.dashCase}" as |demo|>`)
|
|
31
31
|
];
|
|
32
32
|
if (component.description) {
|
|
33
|
-
nodes.push(unist_builder_1.default('html', `<demo.Description
|
|
33
|
+
nodes.push((0, unist_builder_1.default)('html', `<demo.Description
|
|
34
34
|
${component.description.title
|
|
35
35
|
? `@title="${component.description.title}" `
|
|
36
36
|
: ''}${component.description.editUrl
|
|
37
37
|
? `@editUrl="${component.description.editUrl}"`
|
|
38
|
-
: ''}>`), component.description.ast, unist_builder_1.default('html', '</demo.Description>'));
|
|
38
|
+
: ''}>`), component.description.ast, (0, unist_builder_1.default)('html', '</demo.Description>'));
|
|
39
39
|
}
|
|
40
|
-
nodes.push(unist_builder_1.default('html', '<demo.Example>'), unist_builder_1.default('html', `<${component.name.pascalCase} />`), unist_builder_1.default('html', '</demo.Example>'));
|
|
40
|
+
nodes.push((0, unist_builder_1.default)('html', '<demo.Example>'), (0, unist_builder_1.default)('html', `<${component.name.pascalCase} />`), (0, unist_builder_1.default)('html', '</demo.Example>'));
|
|
41
41
|
if (component.chunks.length > 1) {
|
|
42
|
-
nodes.push(unist_builder_1.default('html', '<demo.Snippets as |Snippet|>'));
|
|
42
|
+
nodes.push((0, unist_builder_1.default)('html', '<demo.Snippets as |Snippet|>'));
|
|
43
43
|
component.chunks.forEach((chunk) => {
|
|
44
|
-
nodes.push(unist_builder_1.default('html', `<Snippet @name="${chunk.type}">`), chunk.snippet, unist_builder_1.default('html', '</Snippet>'));
|
|
44
|
+
nodes.push((0, unist_builder_1.default)('html', `<Snippet @name="${chunk.type}">`), chunk.snippet, (0, unist_builder_1.default)('html', '</Snippet>'));
|
|
45
45
|
});
|
|
46
|
-
nodes.push(unist_builder_1.default('html', '</demo.Snippets>'));
|
|
46
|
+
nodes.push((0, unist_builder_1.default)('html', '</demo.Snippets>'));
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
49
49
|
component.chunks.forEach((chunk) => {
|
|
50
|
-
nodes.push(unist_builder_1.default('html', `<demo.Snippet @name="${chunk.type}">`), chunk.snippet, unist_builder_1.default('html', '</demo.Snippet>'));
|
|
50
|
+
nodes.push((0, unist_builder_1.default)('html', `<demo.Snippet @name="${chunk.type}">`), chunk.snippet, (0, unist_builder_1.default)('html', '</demo.Snippet>'));
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
|
-
nodes.push(unist_builder_1.default('html', '</DocfyDemo>'));
|
|
53
|
+
nodes.push((0, unist_builder_1.default)('html', '</DocfyDemo>'));
|
|
54
54
|
return nodes;
|
|
55
55
|
}
|
|
56
56
|
exports.createDemoNodes = createDemoNodes;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@docfy/ember",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Ember integration with Docfy",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -30,81 +30,94 @@
|
|
|
30
30
|
"test:ember-compatibility": "echo 'ember try:each TODO'"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@docfy/core": "^0.
|
|
33
|
+
"@docfy/core": "^0.5.0",
|
|
34
34
|
"broccoli-bridge": "^1.0.0",
|
|
35
35
|
"broccoli-file-creator": "^2.1.1",
|
|
36
|
-
"broccoli-funnel": "^3.0.
|
|
36
|
+
"broccoli-funnel": "^3.0.8",
|
|
37
37
|
"broccoli-merge-trees": "^4.2.0",
|
|
38
38
|
"broccoli-node-api": "^1.7.0",
|
|
39
|
-
"broccoli-plugin": "^4.0.
|
|
40
|
-
"broccoli-source": "^3.0.
|
|
39
|
+
"broccoli-plugin": "^4.0.7",
|
|
40
|
+
"broccoli-source": "^3.0.1",
|
|
41
41
|
"calculate-cache-key-for-tree": "2.0.0",
|
|
42
|
-
"debug": "^4.3.
|
|
43
|
-
"ember-cli-babel": "^7.
|
|
44
|
-
"ember-cli-htmlbars": "^
|
|
45
|
-
"ember-cli-typescript": "^4.
|
|
46
|
-
"ember-get-config": "^0.
|
|
42
|
+
"debug": "^4.3.3",
|
|
43
|
+
"ember-cli-babel": "^7.26.11",
|
|
44
|
+
"ember-cli-htmlbars": "^6.0.1",
|
|
45
|
+
"ember-cli-typescript": "^4.2.1",
|
|
46
|
+
"ember-get-config": "^1.0.2",
|
|
47
47
|
"mdast-util-to-string": "^2.0.0",
|
|
48
|
-
"remark-hbs": "^0.4.
|
|
48
|
+
"remark-hbs": "^0.4.1",
|
|
49
49
|
"unist-builder": "^2.0.3",
|
|
50
50
|
"unist-util-find": "^1.0.2",
|
|
51
51
|
"unist-util-visit": "^2.0.2"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@
|
|
54
|
+
"@babel/helper-define-map": "^7.16.7",
|
|
55
|
+
"@docfy/plugin-with-prose": "^0.5.0",
|
|
55
56
|
"@ember/optional-features": "^2.0.0",
|
|
56
|
-
"@ember/test-helpers": "^2.
|
|
57
|
-
"@embroider/compat": "^0.
|
|
58
|
-
"@embroider/core": "^0.
|
|
59
|
-
"@embroider/webpack": "^0.
|
|
60
|
-
"@glimmer/component": "^1.0.
|
|
61
|
-
"@glimmer/tracking": "^1.0.
|
|
57
|
+
"@ember/test-helpers": "^2.6.0",
|
|
58
|
+
"@embroider/compat": "^1.0.0",
|
|
59
|
+
"@embroider/core": "^1.0.0",
|
|
60
|
+
"@embroider/webpack": "^1.0.0",
|
|
61
|
+
"@glimmer/component": "^1.0.4",
|
|
62
|
+
"@glimmer/tracking": "^1.0.4",
|
|
62
63
|
"@mapbox/rehype-prism": "^0.5.0",
|
|
63
64
|
"@tailwindcss/typography": "^0.4.0",
|
|
64
|
-
"@types/
|
|
65
|
-
"@types/ember": "^
|
|
66
|
-
"@types/
|
|
67
|
-
"@types/
|
|
68
|
-
"@types/
|
|
69
|
-
"@types/
|
|
70
|
-
"@types/
|
|
65
|
+
"@types/ember-qunit": "^5.0.0",
|
|
66
|
+
"@types/ember-resolver": "^5.0.11",
|
|
67
|
+
"@types/ember__application": "^4.0.0",
|
|
68
|
+
"@types/ember__array": "^4.0.1",
|
|
69
|
+
"@types/ember__component": "^4.0.1",
|
|
70
|
+
"@types/ember__debug": "^4.0.0",
|
|
71
|
+
"@types/ember__error": "^4.0.0",
|
|
72
|
+
"@types/ember__object": "^4.0.0",
|
|
73
|
+
"@types/ember__routing": "^4.0.2",
|
|
74
|
+
"@types/ember__runloop": "^4.0.0",
|
|
75
|
+
"@types/ember__service": "^4.0.0",
|
|
76
|
+
"@types/ember__string": "^3.0.9",
|
|
77
|
+
"@types/ember__template": "^4.0.0",
|
|
78
|
+
"@types/ember__test": "^4.0.0",
|
|
79
|
+
"@types/ember__test-helpers": "^2.6.1",
|
|
80
|
+
"@types/htmlbars-inline-precompile": "^3.0.0",
|
|
81
|
+
"@types/qunit": "^2.11.3",
|
|
82
|
+
"@types/rsvp": "^4.0.4",
|
|
71
83
|
"@types/sinon": "^9.0.10",
|
|
72
|
-
"autoprefixer": "^10.2
|
|
84
|
+
"autoprefixer": "^10.4.2",
|
|
73
85
|
"broccoli-asset-rev": "^3.0.0",
|
|
74
|
-
"ember-auto-import": "^
|
|
75
|
-
"ember-cli": "~
|
|
86
|
+
"ember-auto-import": "^2.4.0",
|
|
87
|
+
"ember-cli": "~4.1.1",
|
|
76
88
|
"ember-cli-dependency-checker": "^3.2.0",
|
|
77
|
-
"ember-cli-fastboot": "^
|
|
78
|
-
"ember-cli-fastboot-testing": "^0.
|
|
79
|
-
"ember-cli-inject-live-reload": "^2.0
|
|
80
|
-
"ember-cli-postcss": "^
|
|
89
|
+
"ember-cli-fastboot": "^3.2.0-beta.5",
|
|
90
|
+
"ember-cli-fastboot-testing": "^0.6.0",
|
|
91
|
+
"ember-cli-inject-live-reload": "^2.1.0",
|
|
92
|
+
"ember-cli-postcss": "^8.0.0",
|
|
81
93
|
"ember-cli-sri": "^2.1.1",
|
|
82
94
|
"ember-cli-typescript-blueprints": "^3.0.0",
|
|
83
95
|
"ember-cli-uglify": "^3.0.0",
|
|
84
96
|
"ember-disable-prototype-extensions": "^1.1.3",
|
|
85
97
|
"ember-export-application-global": "^2.0.1",
|
|
86
98
|
"ember-load-initializers": "^2.1.2",
|
|
87
|
-
"ember-maybe-import-regenerator": "^0.
|
|
88
|
-
"ember-qunit": "^5.1.
|
|
89
|
-
"ember-resolver": "^8.0.
|
|
99
|
+
"ember-maybe-import-regenerator": "^1.0.0",
|
|
100
|
+
"ember-qunit": "^5.1.5",
|
|
101
|
+
"ember-resolver": "^8.0.3",
|
|
90
102
|
"ember-router-helpers": "^0.4.0",
|
|
91
103
|
"ember-sinon": "^5.0.0",
|
|
92
|
-
"ember-source": "~
|
|
104
|
+
"ember-source": "~4.1.0",
|
|
93
105
|
"ember-source-channel-url": "^3.0.0",
|
|
94
106
|
"ember-template-lint": "^2.18.0",
|
|
95
|
-
"ember-try": "^
|
|
107
|
+
"ember-try": "^2.0.0",
|
|
96
108
|
"loader.js": "^4.7.0",
|
|
97
109
|
"npm-run-all": "^4.1.5",
|
|
98
|
-
"postcss-import": "^14.0.
|
|
99
|
-
"postcss-nested": "^5.0.
|
|
100
|
-
"prember": "^1.0
|
|
101
|
-
"qunit": "^2.
|
|
102
|
-
"qunit-dom": "^
|
|
103
|
-
"refractor": "^3.
|
|
110
|
+
"postcss-import": "^14.0.2",
|
|
111
|
+
"postcss-nested": "^5.0.6",
|
|
112
|
+
"prember": "^1.1.0",
|
|
113
|
+
"qunit": "^2.17.2",
|
|
114
|
+
"qunit-dom": "^2.0.0",
|
|
115
|
+
"refractor": "^3.0.0",
|
|
104
116
|
"remark-autolink-headings": "^6.0.0",
|
|
105
117
|
"remark-code-import": "^0.2.0",
|
|
106
118
|
"tailwindcss": "^2.0.2",
|
|
107
|
-
"typescript": "^4.1.3"
|
|
119
|
+
"typescript": "^4.1.3",
|
|
120
|
+
"webpack": "^5.67.0"
|
|
108
121
|
},
|
|
109
122
|
"engines": {
|
|
110
123
|
"node": ">= 12"
|
|
@@ -122,5 +135,5 @@
|
|
|
122
135
|
"prember"
|
|
123
136
|
]
|
|
124
137
|
},
|
|
125
|
-
"gitHead": "
|
|
138
|
+
"gitHead": "660408a83302ec4dc727acc0339a506fe0316b54"
|
|
126
139
|
}
|
|
@@ -23,8 +23,9 @@ import path from 'path';
|
|
|
23
23
|
* This is necessary for apps using remark-autolink-headings, for example.
|
|
24
24
|
*/
|
|
25
25
|
function createHeading(ctx: Context): Node {
|
|
26
|
-
const heading = (
|
|
27
|
-
.children as Node[]
|
|
26
|
+
const heading = (
|
|
27
|
+
ctx.remark.runSync(ctx.remark.parse('## Examples')).children as Node[]
|
|
28
|
+
)[0];
|
|
28
29
|
heading.depth = 2;
|
|
29
30
|
return heading;
|
|
30
31
|
}
|