Skip to content

chore(*): convert demos to stackblitz #8546

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
Nov 21, 2017
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
6 changes: 3 additions & 3 deletions scripts/deploy/publish-docs-content.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ git clone $repoUrl $repoPath --depth 1
rm -rf $repoPath/*

# Create folders that will contain docs content files.
mkdir $repoPath/{overview,guides,api,examples,plunker,examples-package}
mkdir $repoPath/{overview,guides,api,examples,stackblitz,examples-package}

# Copy api files over to $repoPath/api
cp -r $docsPath/api/* $repoPath/api
Expand Down Expand Up @@ -75,8 +75,8 @@ done
# Copy highlighted examples into $repoPath
cp -r $examplesSource/* $repoPath/examples

# Copy example plunker assets
cp -r $docsPath/plunker/* $repoPath/plunker
# Copy example stackblitz assets
cp -r $docsPath/stackblitz/* $repoPath/stackblitz

# Copies assets over to the docs-content repository.
cp LICENSE $repoPath/
Expand Down
2 changes: 1 addition & 1 deletion src/material-examples/example-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export class ExampleData {

constructor(example: string) {
if (example && EXAMPLE_COMPONENTS[example]) {
this.examplePath = `/assets/plunker/examples/${example}/`;
this.examplePath = `/assets/stackblitz/examples/${example}/`;
// TODO(tinayuangao): Do not hard-code extensions
this.exampleFiles = ['html', 'ts', 'css']
.map((extension) => `${example}-example.${extension}`);
Expand Down
8 changes: 4 additions & 4 deletions tools/gulp/tasks/docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ task('docs', [
'api-docs',
'minified-api-docs',
'build-examples-module',
'plunker-example-assets',
'stackblitz-example-assets',
]);

/** Generates html files from the markdown overviews and guides for material. */
Expand Down Expand Up @@ -151,10 +151,10 @@ task('minified-api-docs', ['api-docs'], () => {
.pipe(dest('dist/docs/api/'));
});

/** Copies example sources to be used as plunker assets for the docs site. */
task('plunker-example-assets', () => {
/** Copies example sources to be used as stackblitz assets for the docs site. */
task('stackblitz-example-assets', () => {
src(path.join(packagesDir, 'material-examples', '**/*'))
.pipe(dest(path.join(DIST_DOCS, 'plunker', 'examples')));
.pipe(dest(path.join(DIST_DOCS, 'stackblitz', 'examples')));
});

/** Updates the markdown file's content to work inside of the docs app. */
Expand Down