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

Commit 3eb7a41

Browse files
thelgevoldwardbell
authored andcommitted
docs(aot-cb):bundle in-mem-web-api with esm and umd (#2617)
s s
1 parent 1fe6434 commit 3eb7a41

File tree

9 files changed

+13
-32
lines changed

9 files changed

+13
-32
lines changed

public/docs/_examples/_boilerplate/systemjs.config.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
// other libraries
2828
'rxjs': 'npm:rxjs',
29-
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api',
29+
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js'
3030
},
3131
// packages tells the System loader how to load when no filename and/or no extension
3232
packages: {
@@ -36,10 +36,6 @@
3636
},
3737
rxjs: {
3838
defaultExtension: 'js'
39-
},
40-
'angular-in-memory-web-api': {
41-
main: './index.js',
42-
defaultExtension: 'js'
4339
}
4440
}
4541
});

public/docs/_examples/_boilerplate/systemjs.config.plunker.build.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
// other libraries
5353
'rxjs': 'npm:rxjs',
54-
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api',
54+
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
5555
'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js',
5656
'typescript': 'npm:typescript@2.0.2/lib/typescript.js',
5757

@@ -64,10 +64,6 @@
6464
},
6565
rxjs: {
6666
defaultExtension: 'js'
67-
},
68-
'angular-in-memory-web-api': {
69-
main: './index.js',
70-
defaultExtension: 'js'
7167
}
7268
}
7369
});

public/docs/_examples/_boilerplate/systemjs.config.plunker.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
// other libraries
4040
'rxjs': 'npm:rxjs',
41-
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api',
41+
'angular-in-memory-web-api': 'npm:angular-in-memory-web-api/bundles/in-memory-web-api.umd.js',
4242
'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js',
4343
'typescript': 'npm:typescript@2.0.2/lib/typescript.js',
4444

@@ -51,10 +51,6 @@
5151
},
5252
rxjs: {
5353
defaultExtension: 'js'
54-
},
55-
'angular-in-memory-web-api': {
56-
main: './index.js',
57-
defaultExtension: 'js'
5854
}
5955
}
6056
});

public/docs/_examples/toh-6/ts/aot/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
<title>Angular Tour of Heroes</title>
77
<meta name="viewport" content="width=device-width, initial-scale=1">
88

9+
<link rel="stylesheet" href="styles.css">
10+
911
<script src="shim.min.js"></script>
1012
<script src="zone.min.js"></script>
1113
<!-- #docregion moduleId -->

public/docs/_examples/toh-6/ts/app/app.module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { AppRoutingModule } from './app-routing.module';
1414

1515
// #enddocregion v1
1616
// Imports for loading & configuring the in-memory web api
17-
import { InMemoryWebApiModule } from 'angular-in-memory-web-api/in-memory-web-api.module';
17+
import { InMemoryWebApiModule } from 'angular-in-memory-web-api';
1818
import { InMemoryDataService } from './in-memory-data.service';
1919

2020
// #docregion v1

public/docs/_examples/toh-6/ts/copy-dist-files.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
var fs = require('fs');
33
var resources = [
44
'node_modules/core-js/client/shim.min.js',
5-
'node_modules/zone.js/dist/zone.min.js'
5+
'node_modules/zone.js/dist/zone.min.js',
6+
'styles.css'
67
];
78
resources.map(function(f) {
89
var path = f.split('/');

public/docs/_examples/toh-6/ts/rollup-config.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@ export default {
1212
sourceMapFile: 'aot/dist/build.js.map',
1313
format: 'iife',
1414
plugins: [
15-
nodeResolve({jsnext: true, module: true}),
16-
commonjs({
17-
include: [
18-
'node_modules/rxjs/**',
19-
'node_modules/angular-in-memory-web-api/**'
20-
],
21-
}),
22-
uglify()
15+
nodeResolve({jsnext: true, module: true}),
16+
commonjs({
17+
include: ['node_modules/rxjs/**']
18+
}),
19+
uglify()
2320
]
2421
}

public/docs/ts/latest/cookbook/aot-compiler.jade

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -401,13 +401,6 @@ a#toh
401401

402402
Rollup does the Tree Shaking as before.
403403

404-
The Rollup configuration changes slightly to accommodate the `angular-in-memory-web-api` module
405-
that the _Tour of Heroes_ app requires for data server simulation.
406-
407-
The `angular-in-memory-web-api` is a `commonjs` module like the RxJS library.
408-
Add `angular-in-memory-web-api` to the _commonjs plugin_ `include` array,
409-
next to the `rxjs` file specification.
410-
411404
+makeExample('toh-6/ts/rollup-config.js',null,'rollup-config.js')(format='.')
412405

413406
:marked
Loading

0 commit comments

Comments
 (0)