Skip to content
This repository was archived by the owner on Dec 18, 2024. It is now read-only.

Commit 60b84cc

Browse files
authored
Fix broken plunkers (#212)
1 parent 42efa47 commit 60b84cc

File tree

5 files changed

+120
-43
lines changed

5 files changed

+120
-43
lines changed

package-lock.json

Lines changed: 36 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818
"private": true,
1919
"dependencies": {
2020
"@angular/animations": "^4.0.0",
21-
"@angular/cdk": "github:angular/cdk-builds",
21+
"@angular/cdk": "2.0.0-beta.8",
2222
"@angular/common": "^4.0.0",
2323
"@angular/compiler": "^4.0.0",
2424
"@angular/core": "^4.0.0",
2525
"@angular/forms": "^4.0.0",
2626
"@angular/http": "^4.0.0",
27-
"@angular/material": "github:angular/material2-builds",
27+
"@angular/material": "2.0.0-beta.8",
2828
"@angular/platform-browser": "^4.0.0",
2929
"@angular/platform-browser-dynamic": "^4.0.0",
3030
"@angular/router": "^4.0.0",

src/assets/plunker/main.ts

Lines changed: 73 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,80 @@ import {BrowserModule} from '@angular/platform-browser';
33
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
44
import {NgModule} from '@angular/core';
55
import {FormsModule, ReactiveFormsModule} from '@angular/forms';
6-
import {MaterialModule, MdNativeDateModule} from '@angular/material';
6+
import {
7+
MdAutocompleteModule,
8+
MdButtonModule,
9+
MdButtonToggleModule,
10+
MdCardModule,
11+
MdCheckboxModule,
12+
MdChipsModule,
13+
MdCoreModule,
14+
MdDatepickerModule,
15+
MdDialogModule,
16+
MdExpansionModule,
17+
MdGridListModule,
18+
MdIconModule,
19+
MdInputModule,
20+
MdListModule,
21+
MdMenuModule,
22+
MdNativeDateModule,
23+
MdPaginatorModule,
24+
MdProgressBarModule,
25+
MdProgressSpinnerModule,
26+
MdRadioModule,
27+
MdRippleModule,
28+
MdSelectModule,
29+
MdSidenavModule,
30+
MdSliderModule,
31+
MdSlideToggleModule,
32+
MdSnackBarModule,
33+
MdSortModule,
34+
MdTableModule,
35+
MdTabsModule,
36+
MdToolbarModule,
37+
MdTooltipModule,
38+
} from '@angular/material';
739
import {MaterialDocsExample} from './material-docs-example';
840
import {HttpModule} from '@angular/http';
41+
import {CdkTableModule} from '@angular/cdk';
42+
43+
@NgModule({
44+
exports: [
45+
CdkTableModule,
46+
MdAutocompleteModule,
47+
MdButtonModule,
48+
MdButtonToggleModule,
49+
MdCardModule,
50+
MdCheckboxModule,
51+
MdChipsModule,
52+
MdCoreModule,
53+
MdDatepickerModule,
54+
MdDialogModule,
55+
MdExpansionModule,
56+
MdGridListModule,
57+
MdIconModule,
58+
MdInputModule,
59+
MdListModule,
60+
MdMenuModule,
61+
MdNativeDateModule,
62+
MdPaginatorModule,
63+
MdProgressBarModule,
64+
MdProgressSpinnerModule,
65+
MdRadioModule,
66+
MdRippleModule,
67+
MdSelectModule,
68+
MdSidenavModule,
69+
MdSliderModule,
70+
MdSlideToggleModule,
71+
MdSnackBarModule,
72+
MdSortModule,
73+
MdTableModule,
74+
MdTabsModule,
75+
MdToolbarModule,
76+
MdTooltipModule,
77+
]
78+
})
79+
export class PlunkerMaterialModule {}
980

1081
@NgModule({
1182

@@ -14,7 +85,7 @@ import {HttpModule} from '@angular/http';
1485
BrowserAnimationsModule,
1586
FormsModule,
1687
HttpModule,
17-
MaterialModule,
88+
PlunkerMaterialModule,
1889
MdNativeDateModule,
1990
ReactiveFormsModule,
2091
],

src/assets/plunker/systemjs.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ System.config({
3131
'@angular/animations/browser': 'https://unpkg.com/@angular/animations/bundles/animations-browser.umd.js',
3232
'@angular/platform-browser/animations': 'https://unpkg.com/@angular/platform-browser/bundles/platform-browser-animations.umd.js',
3333
'@angular/material': 'https://unpkg.com/@angular/material/bundles/material.umd.js',
34+
'@angular/cdk': 'https://unpkg.com/@angular/cdk/bundles/cdk.umd.js',
3435

3536
// Rxjs mapping
3637
'rxjs': 'https://unpkg.com/rxjs',

tools/fetch-assets.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,13 @@ tmpAssetClonePath=/tmp/material-assets
1818
docsContentRepo=https://github.com/angular/material2-docs-content
1919

2020
# Dirs for each of api docs, guides, overviews, and live-examples within the
21-
# cloned content repo.
21+
# cloned content repo. The absense of the trailing slash here is significant if
22+
# someone is running on a Mac.
2223
apiPath=${tmpAssetClonePath}/api
2324
guidesPath=${tmpAssetClonePath}/guides
2425
overviewPath=${tmpAssetClonePath}/overview
25-
examplesPath=${tmpAssetClonePath}/examples/
26-
plunkerExamplesPath=${tmpAssetClonePath}/plunker/examples/
26+
examplesPath=${tmpAssetClonePath}/examples
27+
plunkerExamplesPath=${tmpAssetClonePath}/plunker/examples
2728

2829
# Create folders into which to copy content and assets.
2930
mkdir -p ${tmpAssetClonePath}
@@ -33,13 +34,13 @@ mkdir -p ${exampleAssetsPath} ${docAssetsPath}
3334
git clone ${docsContentRepo} ${tmpAssetClonePath} --depth 1
3435

3536
# Copy files over to their proper place in src/assets
36-
cp -r ${apiPath} ${overviewPath} ${guidesPath} ${docAssetsPath}
37-
cp -r ${examplesPath} ${exampleAssetsPath}
38-
cp -r ${plunkerExamplesPath} ${plunkerExampleAssetsPath}
37+
cp -R ${apiPath} ${overviewPath} ${guidesPath} ${docAssetsPath}
38+
cp -R ${examplesPath} ${exampleAssetsPath}
39+
cp -R ${plunkerExamplesPath} ${plunkerExampleAssetsPath}
3940

4041
# Install the live examples component library
4142
mkdir -p ./node_modules/@angular/material-examples
42-
cp -r ${tmpAssetClonePath}/examples-package/* ./node_modules/@angular/material-examples
43+
cp -R ${tmpAssetClonePath}/examples-package/* ./node_modules/@angular/material-examples
4344

4445
# Remove temporary directory
4546
rm -rf ${tmpAssetClonePath}

0 commit comments

Comments
 (0)