From e055b9f13c0fba0654abf6cb4e803930ec631efe Mon Sep 17 00:00:00 2001 From: Austin Date: Tue, 21 Nov 2017 11:01:05 -0600 Subject: [PATCH] docs: convert demos to stackblitz (#8546) --- scripts/deploy/publish-docs-content.sh | 6 +++--- src/material-examples/example-data.ts | 2 +- tools/gulp/tasks/docs.ts | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/deploy/publish-docs-content.sh b/scripts/deploy/publish-docs-content.sh index df470f4ae1f..64b3c45c099 100755 --- a/scripts/deploy/publish-docs-content.sh +++ b/scripts/deploy/publish-docs-content.sh @@ -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 @@ -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/ diff --git a/src/material-examples/example-data.ts b/src/material-examples/example-data.ts index f053682199e..78ebe29b6bb 100644 --- a/src/material-examples/example-data.ts +++ b/src/material-examples/example-data.ts @@ -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}`); diff --git a/tools/gulp/tasks/docs.ts b/tools/gulp/tasks/docs.ts index 0e381c95bb8..c043ba06dac 100644 --- a/tools/gulp/tasks/docs.ts +++ b/tools/gulp/tasks/docs.ts @@ -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. */ @@ -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. */