Skip to content

Commit dd5108e

Browse files
committed
build: open correct file in Stackblitz editor
The path for the file that Stackblitz should open in the editor was wrong which meant that it would open any random file. These changes correct the path.
1 parent 12b50b2 commit dd5108e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

docs/src/app/shared/stackblitz/stackblitz-writer.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,6 @@ export const TEMPLATE_FILES = [
5353
'src/test.ts',
5454
];
5555

56-
const PROJECT_TAGS = ['angular', 'material', 'cdk', 'web', 'example'];
57-
const PROJECT_TEMPLATE = 'node';
58-
5956
/**
6057
* Type describing an in-memory file dictionary, representing a
6158
* directory and its contents.
@@ -82,7 +79,7 @@ export class StackBlitzWriter {
8279
// and the file requests can cause excessive change detections.
8380
return this._ngZone.runOutsideAngular(async () => {
8481
const files = await this._buildInMemoryFileDictionary(data, exampleId, isTest);
85-
const exampleMainFile = `src/app/${data.indexFilename}`;
82+
const exampleMainFile = `src/example/${data.indexFilename}`;
8683

8784
return () => {
8885
this._openStackBlitz({
@@ -112,8 +109,8 @@ export class StackBlitzWriter {
112109
title,
113110
files,
114111
description,
115-
template: PROJECT_TEMPLATE,
116-
tags: PROJECT_TAGS,
112+
template: 'node',
113+
tags: ['angular', 'material', 'cdk', 'web', 'example'],
117114
},
118115
{openFile},
119116
);

0 commit comments

Comments
 (0)