Skip to content

Commit b2bb4c8

Browse files
committed
build: publish material-examples package
* Publish the `material-examples` package in the `material2-docs-content` repository. Fixes angular#3518.
1 parent abd2ac6 commit b2bb4c8

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

scripts/release/publish-docs-content.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,13 @@
66
cd "$(dirname $0)/../../"
77

88
docsPath="./dist/docs"
9+
packagePath="./dist/releases/material-examples"
910
repoPath="/tmp/material2-docs-content"
1011
repoUrl="https://github.com/angular/material2-docs-content"
1112
examplesSource="./dist/docs/examples"
1213

13-
# If the docs directory is not present, generate docs
14-
if [ ! -d $docsPath ]; then
15-
$(npm bin)/gulp docs
16-
fi
14+
$(npm bin)/gulp examples:release
15+
$(npm bin)/gulp docs
1716

1817
# Get git meta info for commit
1918
commitSha="$(git rev-parse --short HEAD)"
@@ -28,15 +27,16 @@ git clone $repoUrl $repoPath
2827

2928
# Clean out repo directory and copy contents of dist/docs into it
3029
rm -rf $repoPath/*
31-
mkdir $repoPath/overview
32-
mkdir $repoPath/guides
33-
mkdir $repoPath/api
34-
mkdir $repoPath/examples
35-
mkdir $repoPath/plunker
30+
31+
# Create folders that will contain docs content files.
32+
mkdir $repoPath/{overview,guides,api,examples,plunker,examples-package}
3633

3734
# Copy api files over to $repoPath/api
3835
cp -r $docsPath/api/* $repoPath/api
3936

37+
# Copy the material-examples package to the docs content repository.
38+
cp -r $packagePath/* $repoPath/examples-package
39+
4040
# Flatten the markdown docs structure and move it into $repoPath/overview
4141
overviewFiles=$docsPath/markdown/
4242
for filename in $overviewFiles*

tools/gulp/tasks/docs.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ task('highlight-examples', () => {
8888
path.basename = `${path.basename}-${extension}`;
8989
};
9090

91-
return src('src/examples/**/*.+(html|css|ts)')
91+
return src('src/material-examples/**/*.+(html|css|ts)')
9292
.pipe(flatten())
9393
.pipe(rename(renameFile))
9494
.pipe(highlight())
@@ -111,7 +111,7 @@ task('minified-api-docs', ['api-docs'], () => {
111111

112112
/** Copies example sources to be used as plunker assets for the docs site. */
113113
task('plunker-example-assets', () => {
114-
src(path.join(SOURCE_ROOT, 'examples', '**/*'))
114+
src(path.join(SOURCE_ROOT, 'material-examples', '**/*'))
115115
.pipe(dest(path.join(DIST_DOCS, 'plunker', 'examples')));
116116
});
117117

0 commit comments

Comments
 (0)