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

Commit 7340417

Browse files
committed
line breaks
1 parent 540de52 commit 7340417

File tree

1 file changed

+22
-11
lines changed

1 file changed

+22
-11
lines changed

public/docs/ts/latest/cookbook/third-party-lib.jade

+22-11
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@ include ../_util-fns
22

33
:marked
44
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.
67
Everyone benefits from a healthy library ecosystem.
78

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.
1013

1114
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.
1317

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.
1520

1621
.alert.is-important
1722
:marked
@@ -357,7 +362,8 @@ code-example(language="json").
357362
Only code written in TypeScript can be AOT compiled.
358363

359364
Before publishing the library must first be compiled using the `ngc` compiler.
360-
`ngc` extends the `tsc` compiler by adding extensions to support AOT compilation in addition to regular TypeScript compilation.
365+
`ngc` extends the `tsc` compiler by adding extensions to support AOT compilation in addition to
366+
regular TypeScript compilation.
361367

362368
AOT compilation outputs three files that must be included in order to be compatible with AOT.
363369

@@ -367,8 +373,8 @@ code-example(language="json").
367373

368374
*Typings files*
369375

370-
JavaScript has no way of representing typings. In order to preserve the original typings, `ngc`
371-
will generate `.d.ts` typings files.
376+
JavaScript has no way of representing typings.
377+
In order to preserve the original typings, `ngc` will generate `.d.ts` typings files.
372378

373379
*Meta Data JSON files*
374380

@@ -405,11 +411,16 @@ code-example(language="json").
405411
:marked
406412
## Appendix: Supporting JIT
407413

408-
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.
409416

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.
411421

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
423+
any external templates or css.
413424

414425

415426
.l-main-section

0 commit comments

Comments
 (0)