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

Commit 1463d67

Browse files
committed
whitespace
1 parent 31a5c40 commit 1463d67

File tree

1 file changed

+23
-10
lines changed

1 file changed

+23
-10
lines changed

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

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,14 @@ code-example(language="json").
345345
:marked
346346
## Appendix: Supporting AOT
347347

348-
AOT plays an important role in optimizing Angular applications. It's therefore important that third party libraries be published in a format compatible with AOT compilation. Otherwise it will not be possible to include the library in an AOT compiled application.
348+
AOT plays an important role in optimizing Angular applications.
349+
It's therefore important that third party libraries be published in a format compatible with AOT
350+
compilation.
351+
Otherwise it will not be possible to include the library in an AOT compiled application.
349352

350353
Only code written in TypeScript can be AOT compiled.
351354

352355
Before publishing the library must first be compiled using the `ngc` compiler.
353-
354356
`ngc` extends the `tsc` compiler by adding extensions to support AOT compilation in addition to regular TypeScript compilation.
355357

356358
AOT compilation outputs three files that must be included in order to be compatible with AOT.
@@ -361,27 +363,38 @@ code-example(language="json").
361363

362364
*Typings files*
363365

364-
JavaScript has no way of representing typings. In order to preserve the original typings, `ngc` will generate `.d.ts` typings files.
366+
JavaScript has no way of representing typings. In order to preserve the original typings, `ngc`
367+
will generate `.d.ts` typings files.
365368

366369
*Meta Data JSON files*
367370

368-
`ngc` outputs a metadata.json file for every `Component` and `NgModule`. These meta data files represent the information in the original `NgModule` and `Component` decorators.
371+
`ngc` outputs a metadata.json file for every `Component` and `NgModule`.
372+
These meta data files represent the information in the original `NgModule` and `Component`
373+
decorators.
369374

370-
The meta data may reference external templates or css files. These external files must be included with the library.
375+
The meta data may reference external templates or css files.
376+
These external files must be included with the library.
371377

372378
### NgFactories
373379

374-
`ngc` generates a series of files with an `.ngfactory` suffix as well. These files represent the AOT compiled source, but should not be included with the published library.
380+
`ngc` generates a series of files with an `.ngfactory` suffix as well.
381+
These files represent the AOT compiled source, but should not be included with the published library.
375382

376-
Instead the `ngc` compiler in the consuming application will generate `.ngfactory` files based on the JavaScript, Typings and meta data shipped with the library.
383+
Instead the `ngc` compiler in the consuming application will generate `.ngfactory` files based
384+
on the JavaScript, Typings and meta data shipped with the library.
377385

378386
### Why not publish TypeScript?
379387

380-
Why not ship TypeScript source instead? After all the library will be part of another TypeScript compilation step when the library is imported by the consuming application?
388+
Why not ship TypeScript source instead?
389+
After all the library will be part of another TypeScript compilation step when the library is
390+
imported by the consuming application?
381391

382-
Generally it's discouraged to ship TypeScript with third party libraries. It would require the consumer to replicate the complete build environment of the library. Not only typings, but potentially a specific version of `ngc` as well.
392+
Generally it's discouraged to ship TypeScript with third party libraries.
393+
It would require the consumer to replicate the complete build environment of the library.
394+
Not only typings, but potentially a specific version of `ngc` as well.
383395

384-
Publishing plain JavaScript with typings and meta data allows the consuming application to remain agnostic of the library's build environment.
396+
Publishing plain JavaScript with typings and meta data allows the consuming application to
397+
remain agnostic of the library's build environment.
385398

386399

387400
.l-main-section

0 commit comments

Comments
 (0)