Skip to content

build: fix up naming for Stackblitz #31312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 8, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/firebase.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
]
},
{
"source": "/assets/stack-blitz/**",
"source": "/assets/stackblitz/**",
"headers": [
{
"key": "Cache-Control",
Expand Down
2 changes: 1 addition & 1 deletion docs/src/app/shared/example-viewer/example-viewer.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<mat-icon>code</mat-icon>
</button>

<stack-blitz-button [example]="example"></stack-blitz-button>
<stackblitz-button [example]="example"></stackblitz-button>
</div>

@if (view === 'full') {
Expand Down
4 changes: 2 additions & 2 deletions docs/src/app/shared/example-viewer/example-viewer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {type LiveExample, loadExample} from '@angular/components-examples';
import {CodeSnippet} from './code-snippet';
import {normalizePath} from '../normalize-path';
import {MatTab, MatTabGroup} from '@angular/material/tabs';
import {StackBlitzButton} from '../stack-blitz/stack-blitz-button';
import {StackblitzButton} from '../stackblitz/stackblitz-button';
import {MatIcon} from '@angular/material/icon';
import {MatTooltip} from '@angular/material/tooltip';
import {MatIconButton} from '@angular/material/button';
Expand All @@ -37,7 +37,7 @@ const preferredExampleFileOrder = ['HTML', 'TS', 'CSS'];
MatIconButton,
MatTooltip,
MatIcon,
StackBlitzButton,
StackblitzButton,
MatTabGroup,
MatTab,
CodeSnippet,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
* found in the LICENSE file at https://angular.dev/license
*/

export * from './stack-blitz-button';
export * from './stackblitz-button';
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ import {ExampleData} from '@angular/components-examples';
import {MatIconButton} from '@angular/material/button';
import {MatIcon} from '@angular/material/icon';
import {MatTooltip} from '@angular/material/tooltip';
import {StackBlitzWriter} from './stack-blitz-writer';
import {StackBlitzWriter} from './stackblitz-writer';
import {MatSnackBar} from '@angular/material/snack-bar';

@Component({
selector: 'stack-blitz-button',
templateUrl: './stack-blitz-button.html',
selector: 'stackblitz-button',
templateUrl: './stackblitz-button.html',
imports: [MatIconButton, MatTooltip, MatIcon],
})
export class StackBlitzButton {
export class StackblitzButton {
private _stackBlitzWriter = inject(StackBlitzWriter);
private _ngZone = inject(NgZone);
private _snackBar = inject(MatSnackBar);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import {HttpClientTestingModule, HttpTestingController} from '@angular/common/http/testing';
import {fakeAsync, flushMicrotasks, TestBed} from '@angular/core/testing';
import {EXAMPLE_COMPONENTS, ExampleData, LiveExample} from '@angular/components-examples';
import {StackBlitzWriter, TEMPLATE_FILES} from './stack-blitz-writer';
import {StackBlitzWriter, TEMPLATE_FILES} from './stackblitz-writer';
import stackblitz from '@stackblitz/sdk';

const testExampleId = 'my-test-example-id';
const testExampleBasePath = `/docs-content/examples-source/cdk/my-comp/${testExampleId}`;

const FAKE_DOCS: {[key: string]: string} = {
'/assets/stack-blitz/src/index.html': '<material-docs-example></material-docs-example>',
'/assets/stack-blitz/src/main.ts': `import {MaterialDocsExample} from './material-docs-example';`,
'/assets/stackblitz/src/index.html': '<material-docs-example></material-docs-example>',
'/assets/stackblitz/src/main.ts': `import {MaterialDocsExample} from './material-docs-example';`,
[`${testExampleBasePath}/test.ts`]: 'ExampleComponent',
[`${testExampleBasePath}/test.html`]: `<example></example>`,
[`${testExampleBasePath}/src/detail.ts`]: 'DetailComponent',
};

const TEST_URLS = TEMPLATE_FILES.map(filePath => `/assets/stack-blitz/${filePath}`).concat([
const TEST_URLS = TEMPLATE_FILES.map(filePath => `/assets/stackblitz/${filePath}`).concat([
`${testExampleBasePath}/test.ts`,
`${testExampleBasePath}/test.html`,
`${testExampleBasePath}/src/detail.ts`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const COPYRIGHT = `Copyright ${new Date().getFullYear()} Google LLC. All Rights
*/
const DOCS_CONTENT_PATH = '/docs-content/examples-source';

const TEMPLATE_PATH = '/assets/stack-blitz/';
const TEMPLATE_PATH = '/assets/stackblitz/';

/**
* List of boilerplate files for an example StackBlitz.
Expand Down
Loading