Skip to content

Commit 4701c7b

Browse files
devversionandrewseguin
authored andcommitted
build: switch to docs-content from examples package (#14612)
With angular/material.angular.io#565 the docs-content will be pulled from the `@angular/material-examples` package. Changes needed on this repository: * Since we update some styles and logic in favor of simplicity, we need to update the Dgeni templates to conform with these changes. * Remove the unnecessary `examplesPath` property member because we now compute the `docs-content/` asset paths in a consistent way and don't want to mix up the source locations.
1 parent 7d7b509 commit 4701c7b

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/material-examples/example-data.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ export class ExampleData {
1111
/** Description of the example. */
1212
description: string;
1313

14-
/** Path to the example. This is based on the structure of the material.angular.io repo. */
15-
examplePath: string;
16-
1714
/** List of files that are part of this example. */
1815
exampleFiles: string[];
1916

@@ -38,7 +35,6 @@ export class ExampleData {
3835

3936
// TODO(tinayuangao): Do not hard-code extensions
4037
this.exampleFiles = ['html', 'ts', 'css'].map(extension => `${example}-example.${extension}`);
41-
this.examplePath = `/assets/stackblitz/examples/${example}/`;
4238
this.selectorName = this.indexFilename = `${example}-example`;
4339

4440
if (exampleConfig.additionalFiles) {

tools/dgeni/templates/constant.template.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ <h4 id="{$ constant.name $}" class="docs-header-link docs-api-h4 docs-api-consta
1515
<p class="docs-api-constant-description">{$ constant.description | marked | safe $}</p>
1616
{%- endif -%}
1717

18+
<div class="docs-markdown">
1819
<pre class="docs-markdown-pre">
1920
<code class="docs-markdown-code">
2021
{%- highlight "typescript" -%}
2122
const {$ constant.name | safe $}: {$ constant.type | safe $};
2223
{%- end_highlight -%}
2324
</code>
2425
</pre>
26+
</div>

tools/dgeni/templates/type-alias.template.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@ <h4 id="{$ alias.name $}" class="docs-header-link docs-api-h4 docs-api-type-alia
1515
<p class="docs-api-type-alias-description">{$ alias.description | marked | safe $}</p>
1616
{%- endif -%}
1717

18+
<div class="docs-markdown">
1819
<pre class="docs-markdown-pre">
1920
<code class="docs-markdown-code">
2021
{%- highlight "typescript" -%}
2122
type {$ alias.name | safe $} = {$ alias.typeDefinition | safe $};
2223
{%- end_highlight -%}
2324
</code>
2425
</pre>
26+
</div>

tools/package-docs-content/package-docs-content.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ function getBazelActionArguments() {
2626
}
2727

2828
if (require.main === module) {
29-
// The script expects the output path as first argument. All remaining arguments will be
30-
// considered as markdown input files that need to be transformed.
29+
// Process all file pairs that have been passed to this executable. Each argument will
30+
// consist of the input file path and the desired output location.
3131
getBazelActionArguments().forEach(argument => {
3232
// Each argument that has been passed consists of an input file path and the expected
3333
// output path. e.g. {path_to_input_file},{expected_output_path}

0 commit comments

Comments
 (0)