You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 4, 2017. It is now read-only.
Copy file name to clipboardExpand all lines: public/docs/ts/latest/cookbook/third-party-lib.jade
+22-11
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,21 @@ include ../_util-fns
2
2
3
3
:marked
4
4
Libraries are the backbone of the Angular ecosystem.
5
-
They add functionality that would otherwise take a long time to implement from scratch and keep it up to date.
5
+
They add functionality that would otherwise take a long time to implement from scratch and keep
6
+
up to date.
6
7
Everyone benefits from a healthy library ecosystem.
7
8
8
-
Traditionally, third party JavaScript libraries have been published in the form of a single JavaScript file.
9
-
Consumers of the library have then included the library, "as is", somewhere on the page using a `script` tag.
9
+
Traditionally, third party JavaScript libraries have been published in the form of a single
10
+
JavaScript file.
11
+
Consumers of the library have then included the library, "as is", somewhere on the page using a
12
+
`script` tag.
10
13
11
14
Modern web development has changed this process.
12
-
Instead of publishing a "one size fits all" bundle, developers want to only include the parts of the library they actually need and in the format they need it in.
15
+
Instead of publishing a "one size fits all" bundle, developers want to only include the parts of
16
+
the library they actually need and in the format they need it in.
13
17
14
-
This cookbook shows how to publish a third party library in a way that makes it possible to take advantage of techniques like Ahead of Time Compilation (AOT) and Tree Shaking.
18
+
This cookbook shows how to publish a third party library in a way that makes it possible to
19
+
fully benefit from techniques like Ahead of Time Compilation (AOT) and Tree Shaking.
AOT compiled code is the preferred format for production builds, but due to the long compilation time, it may not be practical to use AOT during development.
414
+
AOT compiled code is the preferred format for production builds, but due to the long compilation
415
+
time, it may not be practical to use AOT during development.
409
416
410
-
To create a more flexible developer experience, a JIT compatible build of the library should be published as well. The format of the JIT bundle is `umd`, which stands for Universal Module Definition. Shipping the bundle as `umd` ensures compatibility with most common module loading formats.
417
+
To create a more flexible developer experience, a JIT compatible build of the library should be
418
+
published as well. The format of the JIT bundle is `umd`, which stands for Universal Module
419
+
Definition.
420
+
Shipping the bundle as `umd` ensures compatibility with most common module loading formats.
411
421
412
-
The `umd` bundle will ship as a single file containing ES5 JavaScript and inlined versions of any external templates or css.
422
+
The `umd` bundle will ship as a single file containing ES5 JavaScript and inlined versions of
0 commit comments