Compare commits

...

69 Commits
8.0.0 ... 8.0.1

Author SHA1 Message Date
e1f6d15387 release: cut the v8.0.1 release 2019-06-13 15:22:16 -07:00
cbb3794931 fix(docs-infra): enable only vertical scrolling for contributors bio (#30991)
- `auto` will enable scrolling only when needed
- `overflow-y` will ensure to keep the scrolling horizontally only

PR Close #30991
2019-06-12 11:47:13 -07:00
77a5790a9d docs: add platform to glossary (#30731)
PR Close #30731
2019-06-12 11:46:25 -07:00
4ca401c394 build(docs-infra): upgrade cli command docs sources to 7da10691d (#30999)
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x).

##
Relevant changes in [commit range](e567d15ae...7da10691d):

**Modified**
- help/build.json

##

PR Close #30999
2019-06-12 11:45:07 -07:00
3dcd5ebdbc fix(ivy): unable to bind to implicit receiver in embedded views (#30994)
To provide some context: The implicit receiver is part of the
parsed Angular template AST. Any property reads in bindings,
interpolations etc. read from a given object (usually the component
instance). In that case there is an _implicit_ receiver which can also
be specified explicitly by just using `this`.

e.g.

```html
<ng-template>{{this.myProperty}}</ng-template>
```

This works as expected in Ivy and View Engine, but breaks in case the
implicit receiver is not used for property reads. For example:

```html
<my-dir [myFn]="greetFn.bind(this)"></my-dir>
```

In that case the `this` will not be properly translated into the generated
template function code because the Ivy compiler currently always treats
the `ctx` variable as the implicit receiver. This is **not correct** and breaks
compatibility with View Engine. Rather we need to ensure that we retrieve
the root context for the standalone implicit receiver similar to how it works
for property reads (as seen in the example above with `this.myProperty`)

Note that this requires some small changes to the `expression_converter`
because we only want to generate the `eenextContent()` instruction if the
implicit receiver is _actually_ used/needed. View Engine determines if that is the case by recursively walking through the converted output AST and
checking for usages of the `o.variable('_co')` variable ([see here][ve_check]). This would work too for Ivy, but involves most likely more code duplication
since templates are isolated in different functions and it another pass
through the output AST for every template expression.

[ve_check]: 0d6c9d36a1/packages/compiler/src/view_compiler/view_compiler.ts (L206-L208)

Resolves FW-1366.

**NOTE**: Patch version of 58be2ff884
(#30897)

PR Close #30994
2019-06-12 11:44:11 -07:00
49307f0595 fix(bazel): do not modify tsconfig.json (#30984)
This is a patch PR for https://github.com/angular/angular/pull/30877

PR Close #30984
2019-06-11 15:40:39 -07:00
762fc28fee feat(docs-infra): layout ui polish (#30883)
PR Close #30883
2019-06-11 14:20:36 -07:00
338e58c278 docs: use const in dynamic-component-loader example (#30888)
Use const instead of let. Some of the variables are never reassigned, so it is preferred to use const over let

PR Close #30888
2019-06-11 14:20:00 -07:00
7e2ed89208 docs: fix a grammar mistake (#30949)
Grammar mistake is in the JsonPipe section
PR Close #30949
2019-06-11 14:19:17 -07:00
56a3dcf44c build(docs-infra): upgrade cli command docs sources to e567d15ae (#30971)
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x).

##
Relevant changes in [commit range](d09f130ce...e567d15ae):

**Modified**
- help/build.json
- help/generate.json
- help/new.json
- help/serve.json
- help/test.json

##

PR Close #30971
2019-06-11 14:17:32 -07:00
501bacdcf6 build: update golden for //packages/core/test/bundling/injection:symbol_test (#30965)
PR Close #30965
2019-06-11 10:54:28 -07:00
c5f2979a87 build(bazel): update to nodejs rules 0.31.1 & bazel 0.26.1 (#30965)
* entry_point attribute of nodejs_binary & rollup_bundle is now a label
* nodejs rules 0.30.1 has new feature to symlink node_modules with yarn_install and bazel 0.26.0 includes new managed_directories feature which enables this
* Symlinking of node_modules for yarn_install temporarily disabled (except for integration/bazel) until the fix for https://github.com/bazelbuild/bazel/issues/8487 makes it into a future bazel release. This is needed to work-around issue: yarn_install & npm_install with managed directories can't handle deleted or manually regenerated node_modules folder [https://github.com/bazelbuild/rules_nodejs/issues/802]. Underlying issue has been fixed in Bazel https://github.com/bazelbuild/bazel/issues/8487 but hasn't landed in a release yet

PR Close #30965
2019-06-11 10:54:28 -07:00
fe02462b5f build(docs-infra): update @angular/* to v8.1.0-next.1 and @angular/material to v8.0.0 (#30935)
PR Close #30935
2019-06-11 00:11:36 +00:00
3000d19ad1 build(docs-infra): update @angular/cli to v8.0.2 (#30935)
This restores named lazy chunks, which were broken during beta/rc (i.e.
the lazy chunks were named 0/1/2/...).

PR Close #30935
2019-06-11 00:11:36 +00:00
dcf9f05c9a docs: use Node.js consistently (#30934)
PR Close #30934
2019-06-11 00:09:49 +00:00
ba56f3c15b refactor(docs-infra): avoid hard-coding URLs to redirect on archive mode (#30894)
Related discussion:
https://github.com/angular/angular/pull/30894#pullrequestreview-246731995

PR Close #30894
2019-06-11 00:07:43 +00:00
865ad56e9a fix(docs-infra): do not redirect docs URLs on archive deployments (#30894)
To avoid showing outdated info (such as events, resources, etc.) but
still allow people to see docs for older versions, we redirect
non-documentation URLs to `/docs`. Recently(-ish) we have added
documentation content under the `/cli/...` and `/start/...`
path-prefixes, but we haven't added them to the list of documentation
URLs that should not be redirected. As a result, on archive deployments
(e.g. https://v7.angular.io/cli), they are redirected to `/docs`, making
it impossible to see the documentation for these versions (unless you
know about the `?mode=stable` work-around).

This commit fixes it by adding `cli` and `start` to the list of
documentation URLs that are excluded from redirection.

PR Close #30894
2019-06-11 00:07:43 +00:00
5cda2a041b refactor(docs-infra): make archive redirection tests DRY (#30894)
PR Close #30894
2019-06-11 00:07:43 +00:00
6a484853a9 build: update rules_nodejs and clean up bazel warnings (#30370) (#30763)
Preserve compatibility with rollup_bundle rule.
Add missing npm dependencies, which are now enforced by the strict_deps plugin in tsc_wrapped

PR Close #30370

PR Close #30763
2019-06-10 23:58:54 +00:00
e6ac289518 build: update to Bazel 0.26 (#30370) (#30763)
PR Close #30370

PR Close #30763
2019-06-10 23:58:54 +00:00
4e8614bb92 fix(common): expose the HttpUploadProgressEvent interface as public API (#30852)
Fixes #30814

PR Close #30852
2019-06-07 08:47:48 -07:00
9ace748d3a docs: add dev.to link to the help section (#30873)
PR Close #30873
2019-06-07 08:47:02 -07:00
08c38a1f99 fix(service-worker): avoid uncaught rejection warning when registration fails (#30876)
Service worker API `navigator.serviceWorker.register` can fail in multiple ways.
For example, in Chrome, with an unstable network connection you can have the
following error: `An unknown error occurred when fetching the script.`

In the current state, it creates an `Uncaught (in promise) TypeError:` style of
error, which cannot be caught by the user on his own.

I think it's better to log the error over raising an error that cannot be
caught.

PR Close #30876
2019-06-07 08:46:26 -07:00
9aeef0afdb build(docs-infra): fail hard if the CLI source is not what we expect (#30901)
Previously we just logged a warning but we should fail
to prevent silently allowing the docs to look wrong if
something changes on the CLI side of things.

PR Close #30901
2019-06-07 08:45:48 -07:00
8aef446373 build(docs-infra): upgrade cli command docs sources to d09f130ce (#30909)
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x).

##
Relevant changes in [commit range](e8bdfe6b9...d09f130ce):

**Modified**
- help/serve.json

##

PR Close #30909
2019-06-07 08:44:42 -07:00
f7ee91a17c build(docs-infra): remove unneeded allowEmptyCodegenFiles option in Ivy mode (#30911)
Previously, when switching to Ivy mode (e.g. to run tests on CI), we had
to add `allowEmptyCodegenFiles: true` to the `angularCompilerOptions` in
`tsconfig.app.json`.

This isn't necessary any more (potentially since we switched to dynamic
imports for loading lazy modules in #30704), so this commit removes it
from the `switch-to-ivy.js` script.

PR Close #30911
2019-06-07 08:43:50 -07:00
8ae0afd3f8 fix(ivy): ngcc - remove unused import to make linting pass (#30914)
The failure is caused by 65f20107f. The unused [`writeFile` import][1]
seems to be a result of merge conflict resolution (since it is not
present on the original PR (#30831).

[1]: 65f20107fe (diff-4840f884874632c2fbfdb64a26213396R9)

PR Close #30914
2019-06-07 08:43:19 -07:00
be82270493 feat(docs-infra): white background and corresponding figure updates (#28396)
PR Close #28396
2019-06-06 13:48:16 -07:00
4cef2c1236 build(docs-infra): fix CLI command github links (#30889)
The "view" links were broken because the version used to
compute the git tag for the GitHub URL included a build SHA.
Now we clean that off before using it in the URL.

The links are to the JSON schema that defines the documentation for
the command. This is accurate but confusing because the content for the
long description is stored in a separate markdown file referenced from this
schema file.
This commit adds a second set of links for the long description, if it exists,
which links directly to the markdown file.

Closes #30700

PR Close #30889
2019-06-06 08:49:38 -07:00
26e3615e19 fix(core): TypeScript related migrations should cater for BOM (#30719)
fix(@schematics/angular): TypeScript related migrations should cater for BOM

In the CLI `UpdateRecorder` methods such as `insertLeft`, `remove` etc.. accepts positions which are not offset by a BOM. This is because when a file has a BOM a different recorder will be used https://github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/src/tree/recorder.ts#L72 which caters for an addition offset/delta.

The main reason for this is that when a developer is writing a schematic they shouldn't need to compute the offset based if a file has a BOM or not and is handled out of the box.

Example
```ts
recorder.insertLeft(5, 'true');
```

However this is unfortunate in the case if a ts SourceFile is used and one uses `getWidth` and `getStart` method they will already be offset by 1, which at the end it results in a double offset and hence the problem.

Fixes #30713

PR Close #30719
2019-06-06 08:44:56 -07:00
65f20107fe fix(ivy): ngcc - use spaces in overwritten package.json content for readability (#30831)
When ngcc processes an entrypoint, it updates `package.json` with
metadata about the processed format. Previously, it overwrote the
`package.json` with the stringified JSON object without spaces. This
made the file difficult to read (for example when looking at the file
while debugging an ngcc failure).

This commit fixes it by using spaces in the new `package.json` content.

PR Close #30831
2019-06-05 21:24:47 -07:00
5a7bcd1862 fix(bazel): Load global stylesheet in dev and prod (#30879)
Global stylesheet should be injected as a <link> tag in index.html for
both dev and prod app.

PR Close #30879
2019-06-05 21:20:59 -07:00
152ea36c80 build: unable to run build-packages-dist script on windows (#30853)
Currently it's not possible to run the `./scripts/build-packages-dist.sh` script on Windows because
`bazel query` returns CRLF line-endings which result on array expansion in Bazel target names
that end with a carriage return (e.g. `//packages/core\r`). This then results in a build failure where
Bazel complains that target names should not end with a carriage return.

In order to fix this, we just strip off the carriage return line-endings from the bazel query stdout. Ideally
the script will be ported to a plain Node script eventually, but for now it prevents Windows users from
building the release packages and the simple workaround seems reasonable and sufficient.

PR Close #30853
2019-06-05 09:05:29 -07:00
ea2adb104b docs: correct typos and formatting in the Getting Started guide (#30758)
PR Close #30758
2019-06-04 13:37:27 -07:00
19caace2ab docs(service-worker): mention that HTTPS is required, unless on localhost (#30847)
Fixes #30823

PR Close #30847
2019-06-04 12:03:12 -07:00
ccc1c27461 refactor: Move away from index signature based "updateCache". (#30518)
We're deprecating the index signature overloads in favor of using a Map.

PR Close #30518
2019-06-04 12:02:13 -07:00
97268b95f7 docs: update example dependencies to 8.x release (#30755)
PR Close #30755
2019-06-04 11:53:56 -07:00
7c41abe64a docs: rename component for constructor example (#30845)
PR Close #30845
2019-06-04 11:52:58 -07:00
991e138650 fix(ivy): unable to project into multiple slots with default selector (#30803)
With View engine it was possible to declare multiple projection
definitions and to programmatically project nodes into the slots.

e.g.

```html
<ng-content></ng-content>
<ng-content></ng-content>
```

Using `ViewContainerRef#createComponent` allowed projecting
nodes into one of the projection defs (through index)

This no longer works with Ivy as the `projectionDef` instruction only
retrieves a list of selectors instead of also retrieving entries for
reserved projection slots which appear when using the default
selector multiple times (as seen above).

In order to fix this issue, the Ivy compiler now passes all
projection slots to the `projectionDef` instruction. Meaning that
there can be multiple projection slots with the same wildcard
selector. This allows multi-slot projection as seen in the
example above, and it also allows us to match the multi-slot node
projection order from View Engine (to avoid breaking changes).

It basically ensures that Ivy fully matches the View Engine behavior
except of a very small edge case that has already been discussed
in FW-886 (with the conclusion of working as intended).

Read more here: https://hackmd.io/s/Sy2kQlgTE

NOTE: This is the patch version of #30561

PR Close #30803
2019-06-03 11:44:44 -07:00
d00b421402 docs: fix quickstart link in readme (#30807)
PR Close #30807
2019-06-03 11:43:59 -07:00
06ffed5141 docs: document UrlTree in guard return type in cheatsheet (#30822)
Add UrlTree to the types of returned values in guard methods

PR Close #30822
2019-06-03 11:43:26 -07:00
5a15126520 docs(core): fix typo in style bindings comment (#30661)
PR Close #30661
2019-06-03 09:01:06 -07:00
9e4b2f1a4f docs: fix a small typo in injectable decorator description (#30785)
PR Close #30785
2019-06-03 08:56:22 -07:00
393529d3b5 docs: update example references from "my-app" to "app-root" (#30789)
"app" is the default prefix for CLI projects when generating components.
This updates our examples to conform that that default

Closes #19778

PR Close #30789
2019-06-03 08:55:39 -07:00
81b75590d7 docs(docs-infra): compile module first for Ivy when loading element modules (#30704)
In View Engine, NgModule factories are created for each NgModule and loaded when the module is requested. Ivy doesn't generate the
factories by design and only loads the module class, so it must be compiled after being loaded.

PR Close #30704
2019-05-31 15:24:23 -07:00
151f0f4b2c refactor(docs-infra): update loading of custom elements to use dynamic import syntax (#30704)
Removes the usage of `NgModuleFactoryLoader` and string-based imports for lazy loading.

PR Close #30704
2019-05-31 15:24:23 -07:00
f88f941008 docs: increase color contrast on elements in tutorial
This increases the color contrast of elements in the tutorial (parts 1-6)
in order to meet WCAG 2.0 AA standards.
2019-05-31 15:23:33 -07:00
0e17958640 fix(docs-infra): add v7 in versions dropdown (#30775)
Fixes #30769

PR Close #30775
2019-05-31 15:19:54 -07:00
e82b45c8a7 docs(docs-infra): remove deprecated Buffer usage from stackblitz builder (#30369)
Fixes #30364

PR Close #30369
2019-05-31 09:56:23 -07:00
8422ef2a93 fix(docs-infra): update tooltip of events link (#30643)
PR Close #30643
2019-05-31 09:50:45 -07:00
cdf586d0d2 build(docs-infra): upgrade cli command docs sources to e8bdfe6b9 (#30777)
Updating [angular#8.0.x](https://github.com/angular/angular/tree/8.0.x) from [cli-builds#8.0.x](https://github.com/angular/cli-builds/tree/8.0.x).

##
Relevant changes in [commit range](9a3d36c98...e8bdfe6b9):

**Modified**
- help/update.json

##

PR Close #30777
2019-05-31 09:45:09 -07:00
3828c89792 ci: add reviewer group for deprecations guide (#30722)
PR Close #30722
2019-05-30 20:45:59 -07:00
0f352b6350 docs: add final release date and update future schedule (#30712)
PR Close #30712
2019-05-30 19:39:24 -07:00
06bdecffb9 docs: remove mention of project settings from analytics (#30701)
This settings are not yet implemented and will be available in 8.1.

PR Close #30701
2019-05-30 13:42:35 -04:00
99ddec152b docs(ivy): fix symbol in example AST (#30745)
PR Close #30745
2019-05-30 13:41:52 -04:00
31aba96fcb docs: improve glossary for entry-point. (#29433)
PR Close #29433
2019-05-30 13:40:55 -04:00
facce2c9fd docs: fix typo in upgrade guide example (#30428)
An code snippet from a `package.json` file used `script`
rather than `scripts`.

Fixes #30418

PR Close #30428
2019-05-30 13:40:07 -04:00
edaf058548 docs: fix closing tags in deprecation summary (#30735)
fix closing tags in "Cannot assign to template variables" section

PR Close #30735
2019-05-30 13:38:54 -04:00
4bff2d0c8c docs: fix deprecation information (#30717)
PR Close #30717
2019-05-30 13:38:34 -04:00
cfc608aaf3 docs: merge duplicated platform-webworker content in Deprecation Guide (#30651)
fix issue of duplicate anchors/ids

PR Close #30651
2019-05-30 13:36:30 -04:00
6d9f5fcddb docs(elements): move clarification about custom elements (#30594)
Moved clarification that "custom elements" are a subtype of Web Components to the first use of the term "custom elements"

PR Close #30594
2019-05-30 13:35:15 -04:00
b19a05c25a docs(common): fix typo in ngSwitch directive description (#30483)
PR Close #30483
2019-05-30 13:34:22 -04:00
bd75b3b7b3 docs: fix the sequence of creating class in HTTP tutorial (#30566)
For more accurate procedure of creating a class in the "Tour of Heroes" app, updated the sequence of creating one class.

PR Close #30566
2019-05-30 13:32:53 -04:00
1c67b9063b docs: clarify usage of using /deep/ in component styles guide (#30452)
Updated the description regarding the (deprecated) /deep/ pseudo-selector to clarify its propensity to bleed styles across components and its solution

closes #29967

PR Close #30452
2019-05-30 13:32:32 -04:00
9a9ae60e0e docs: code sample closing in ivy.md (#30711)
PR Close #30711
2019-05-30 13:32:11 -04:00
ae6fa9260a docs: change wording for more clarity in TypeScript Configuration guide (#30748)
"You need to do nothing" indicates the presence of an action (the action of doing nothing) while the goal is to tell the user that no action is required from them. I think "You don’t need to do anything" is better suitable in this context.

PR Close #30748
2019-05-30 13:31:24 -04:00
f8fa2f2a6c docs(core): template-var-assignment schematic should link to deprecation guide (#30702)
Instead of linking to a markdown file explaining what the migration warnings
are about, we should link to the deprecation guide which now also contains
an entry for that schematic. This makes the deprecation explanations
consistent and more centralized.

PR Close #30702
2019-05-29 13:50:35 -04:00
f3ee9a6144 docs: add note to platform-webworker deprecation (#30705)
PR Close #30705
2019-05-28 16:37:58 -07:00
d076c51455 test: improve language service tests performance (#30683)
With this change we reduce the amount of IO operations. This is especially a huge factor in windows since IO ops are slower.

With this change mainly we cache `existsSync` and `readFileSync` calls

Here's the results

Before
```
//packages/language-service/test:test
INFO: Elapsed time: 258.755s, Critical Path: 253.91s
```

After
```
//packages/language-service/test:test
INFO: Elapsed time: 66.403s, Critical Path: 63.13s
```

PR Close #30683
2019-05-28 16:15:02 -07:00
224 changed files with 5654 additions and 5142 deletions

View File

@ -4,4 +4,5 @@ aio/content
aio/node_modules
aio/tools/examples/shared/node_modules
integration/bazel
integration/bazel-schematics/demo
packages/bazel/node_modules

View File

@ -145,3 +145,12 @@ build:remote --remote_accept_cached=false
# Load any settings specific to the current user. Needs to be last statement in this
# config, as the user configuration should be able to overwrite flags from this file.
try-import .bazelrc.user
###############################
# NodeJS rules settings
# These settings are required for rules_nodejs
###############################
# Turn on managed directories feature in Bazel
# This allows us to avoid installing a second copy of node_modules
common --experimental_allow_incremental_repository_updates

1
.github/CODEOWNERS vendored
View File

@ -812,6 +812,7 @@ testing/** @angular/fw-test
/aio/content/guide/releases.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
/aio/content/guide/updating.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
/aio/content/guide/workspace-config.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes
/aio/content/guide/deprecations.md @angular/fw-docs-packaging @angular/framework-global-approvers @angular/framework-global-approvers-for-docs-only-changes

View File

@ -1,3 +1,17 @@
<a name="8.0.1"></a>
## [8.0.1](https://github.com/angular/angular/compare/8.0.0...8.0.1) (2019-06-13)
### Bug Fixes
* **bazel:** do not modify tsconfig.json ([#30984](https://github.com/angular/angular/issues/30984)) ([49307f0](https://github.com/angular/angular/commit/49307f0))
* **bazel:** Load global stylesheet in dev and prod ([#30879](https://github.com/angular/angular/issues/30879)) ([5a7bcd1](https://github.com/angular/angular/commit/5a7bcd1))
* **common:** expose the `HttpUploadProgressEvent` interface as public API ([#30852](https://github.com/angular/angular/issues/30852)) ([4e8614b](https://github.com/angular/angular/commit/4e8614b)), closes [#30814](https://github.com/angular/angular/issues/30814)
* **core:** TypeScript related migrations should cater for BOM ([#30719](https://github.com/angular/angular/issues/30719)) ([26e3615](https://github.com/angular/angular/commit/26e3615)), closes [/github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/src/tree/recorder.ts#L72](https://github.com//github.com/angular/angular-cli/blob/master/packages/angular_devkit/schematics/src/tree/recorder.ts/issues/L72) [#30713](https://github.com/angular/angular/issues/30713)
* **service-worker:** avoid uncaught rejection warning when registration fails ([#30876](https://github.com/angular/angular/issues/30876)) ([08c38a1](https://github.com/angular/angular/commit/08c38a1))
<a name="8.0.0"></a>
# [8.0.0](https://github.com/angular/angular/compare/8.0.0-rc.5...8.0.0) (2019-05-28)

View File

@ -23,6 +23,6 @@ guidelines for [contributing][contributing] and then check out one of our issues
[browserstack]: https://www.browserstack.com/automate/public-build/LzF3RzBVVGt6VWE2S0hHaC9uYllOZz09LS1BVjNTclBKV0x4eVRlcjA4QVY1M0N3PT0=--eb4ce8c8dc2c1c5b2b5352d473ee12a73ac20e06
[contributing]: https://github.com/angular/angular/blob/master/CONTRIBUTING.md
[quickstart]: https://angular.io/guide/quickstart
[quickstart]: https://angular.io/start
[changelog]: https://github.com/angular/angular/blob/master/CHANGELOG.md
[ng]: https://angular.io

View File

@ -1,4 +1,7 @@
workspace(name = "angular")
workspace(
name = "angular",
managed_directories = {"@npm": ["node_modules"]},
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
@ -15,16 +18,15 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch rules_nodejs so we can install our npm dependencies
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "3a3efbf223f6de733475602844ad3a8faa02abda25ab8cfe1d1ed0db134887cf",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.12/rules_nodejs-0.27.12.tar.gz"],
sha256 = "e04a82a72146bfbca2d0575947daa60fda1878c8d3a3afe868a8ec39a6b968bb",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.31.1/rules_nodejs-0.31.1.tar.gz"],
)
# Check the bazel version and download npm dependencies
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "check_rules_nodejs_version", "node_repositories", "yarn_install")
# Bazel version must be at least v0.21.0 because:
# - 0.21.0 Using --incompatible_strict_action_env flag fixes cache when running `yarn bazel`
# (see https://github.com/angular/angular/issues/27514#issuecomment-451438271)
# Bazel version must be at least the following version because:
# - 0.26.0 managed_directories feature added which is required for nodejs rules 0.30.0
check_bazel_version(
message = """
You no longer need to install Bazel on your machine.
@ -33,22 +35,23 @@ Try running `yarn bazel` instead.
(If you did run that, check that you've got a fresh `yarn install`)
""",
minimum_bazel_version = "0.21.0",
minimum_bazel_version = "0.26.0",
)
# The NodeJS rules version must be at least v0.15.3 because:
# The NodeJS rules version must be at least the following version because:
# - 0.15.2 Re-introduced the prod_only attribute on yarn_install
# - 0.15.3 Includes a fix for the `jasmine_node_test` rule ignoring target tags
# - 0.16.8 Supports npm installed bazel workspaces
# - 0.26.0 Fix for data files in yarn_install and npm_install
# - 0.27.12 Adds NodeModuleSources provider for transtive npm deps support
check_rules_nodejs_version("0.27.12")
# - 0.30.0 yarn_install now uses symlinked node_modules with new managed directories Bazel 0.26.0 feature
# - 0.31.1 entry_point attribute of nodejs_binary & rollup_bundle is now a label
check_rules_nodejs_version("0.31.1")
# Setup the Node.js toolchain
node_repositories(
node_version = "10.9.0",
package_json = ["//:package.json"],
preserve_symlinks = True,
# yarn 1.13.0 under Bazel has a regression on Windows that causes build errors on rebuilds:
# ```
# ERROR: Source forest creation failed: C:/.../fyuc5c3n/execroot/angular/external (Directory not empty)
@ -71,6 +74,10 @@ yarn_install(
package_json = "//:package.json",
# Don't install devDependencies, they are large and not used under Bazel
prod_only = True,
# Temporarily disable node_modules symlinking until the fix for
# https://github.com/bazelbuild/bazel/issues/8487 makes it into a
# future Bazel release
symlink_node_modules = False,
yarn_lock = "//:yarn.lock",
)

View File

@ -12,7 +12,7 @@ import { Component } from '@angular/core';
// #enddocregion import-core-component
@Component({
selector: 'my-app',
selector: 'app-root',
template: 'Welcome to Angular'
})
export class AppComponent {

View File

@ -1,14 +1,14 @@
import { Component } from '@angular/core';
@Component({
selector: 'app-ctor',
selector: 'app-root',
template: `
<h1>{{title}} [Ctor version]</h1>
<h2>My favorite hero is: {{myHero}}</h2>
`
})
// #docregion class
export class AppCtorComponent {
export class AppComponent {
title: string;
myHero: string;

View File

@ -36,14 +36,14 @@ export class AdBannerComponent implements OnInit, OnDestroy {
loadComponent() {
this.currentAdIndex = (this.currentAdIndex + 1) % this.ads.length;
let adItem = this.ads[this.currentAdIndex];
const adItem = this.ads[this.currentAdIndex];
let componentFactory = this.componentFactoryResolver.resolveComponentFactory(adItem.component);
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(adItem.component);
let viewContainerRef = this.adHost.viewContainerRef;
const viewContainerRef = this.adHost.viewContainerRef;
viewContainerRef.clear();
let componentRef = viewContainerRef.createComponent(componentFactory);
const componentRef = viewContainerRef.createComponent(componentFactory);
(<AdComponent>componentRef.instance).data = adItem.data;
}

View File

@ -9,7 +9,7 @@
<!-- #docregion prices -->
<div class="cart-item" *ngFor="let item of items">
<span>{{ item.name }} </span>
<span>{{ item.name }}</span>
<span>{{ item.price | currency }}</span>
</div>
<!-- #enddocregion prices -->
<!-- #enddocregion prices -->

View File

@ -1,6 +1,6 @@
<h3>Shipping Prices</h3>
<div class="shipping-item" *ngFor="let shipping of shippingCosts | async">
<span>{{ shipping.type }} </span>
<span>{{ shipping.type }}</span>
<span>{{ shipping.price | currency }}</span>
</div>
</div>

View File

@ -16,7 +16,9 @@ export class ShippingComponent {
// #enddocregion props
// #docregion inject-cart-service
constructor(private cartService: CartService) {
constructor(
private cartService: CartService
) {
// #enddocregion inject-cart-service
this.shippingCosts = this.cartService.getShippingPrices();
// #docregion inject-cart-service

View File

@ -4,7 +4,7 @@ import { Component } from '@angular/core';
import { heroes } from './hero';
@Component({
selector: 'my-app',
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})

View File

@ -6,7 +6,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<body>
<my-app>Loading...</my-apps>
<app-root>Loading...</app-root>
</body>
</html>

View File

@ -2,7 +2,7 @@
import { Component } from '@angular/core';
@Component({
selector: 'my-app',
selector: 'app-root',
template: `<h1>Hello {{name}}</h1>`
})
export class AppComponent { name = 'Angular'; }

View File

@ -20,9 +20,9 @@
</head>
<body>
<!-- #docregion my-app-->
<my-app><!-- content managed by Angular --></my-app>
<!-- #enddocregion my-app-->
<!-- #docregion app-root-->
<app-root><!-- content managed by Angular --></app-root>
<!-- #enddocregion app-root-->
</body>
</html>

View File

@ -10,7 +10,7 @@ class Hero {
}
@Component({
selector: 'my-app',
selector: 'app-root',
template: `
<h1>{{title}}</h1>
<pre>{{heroes | json}}</pre>

View File

@ -13,7 +13,7 @@ body {
margin: 2em;
}
body, input[type="text"], button {
color: #888;
color: #333;
font-family: Cambria, Georgia;
}
/* everywhere else */

View File

@ -37,7 +37,7 @@
font-size: small;
color: white;
padding: 0.8em 0.7em 0 0.7em;
background-color: #607D8B;
background-color:#405061;
line-height: 1em;
position: relative;
left: -1px;

View File

@ -37,7 +37,7 @@
font-size: small;
color: white;
padding: 0.8em 0.7em 0 0.7em;
background-color: #607D8B;
background-color:#405061;
line-height: 1em;
position: relative;
left: -1px;

View File

@ -37,7 +37,7 @@
font-size: small;
color: white;
padding: 0.8em 0.7em 0 0.7em;
background-color: #607D8B;
background-color:#405061;
line-height: 1em;
position: relative;
left: -1px;

View File

@ -30,6 +30,6 @@ button:disabled {
cursor: auto;
}
button.clear {
color: #888;
color: #333;
margin-bottom: 12px;
}

View File

@ -1,7 +1,6 @@
/* AppComponent's private CSS styles */
h1 {
font-size: 1.2em;
color: #999;
margin-bottom: 0;
}
h2 {
@ -18,7 +17,7 @@ nav a {
border-radius: 4px;
}
nav a:visited, a:link {
color: #607d8b;
color: #334953;
}
nav a:hover {
color: #039be5;

View File

@ -34,7 +34,7 @@ h4 {
color: #eee;
max-height: 120px;
min-width: 120px;
background-color: #607d8b;
background-color: #3f525c;
border-radius: 2px;
}
.module:hover {

View File

@ -22,7 +22,7 @@
}
.heroes a {
color: #888;
color: #333;
text-decoration: none;
position: relative;
display: block;
@ -38,7 +38,7 @@
font-size: small;
color: white;
padding: 0.8em 0.7em 0 0.7em;
background-color: #607D8B;
background-color:#405061;
line-height: 1em;
position: relative;
left: -1px;

View File

@ -30,6 +30,6 @@ button:disabled {
cursor: auto;
}
button.clear {
color: #888;
color: #333;
margin-bottom: 12px;
}

View File

@ -1,7 +1,6 @@
/* AppComponent's private CSS styles */
h1 {
font-size: 1.2em;
color: #999;
margin-bottom: 0;
}
h2 {
@ -18,7 +17,7 @@ nav a {
border-radius: 4px;
}
nav a:visited, a:link {
color: #607D8B;
color: #334953;
}
nav a:hover {
color: #039be5;

View File

@ -34,7 +34,7 @@ h4 {
color: #eee;
max-height: 120px;
min-width: 120px;
background-color: #607D8B;
background-color: #3f525c;
border-radius: 2px;
}
.module:hover {

View File

@ -1,5 +1,5 @@
<div id="search-component">
<h4>Hero Search</h4>
<h4><label for="search-box">Hero Search</label></h4>
<!-- #docregion input -->
<input #searchBox id="search-box" (input)="search(searchBox.value)" />

View File

@ -22,7 +22,7 @@
}
.heroes a {
color: #888;
color: #333;
text-decoration: none;
position: relative;
display: block;
@ -38,7 +38,7 @@
font-size: small;
color: white;
padding: 0.8em 0.7em 0 0.7em;
background-color: #607D8B;
background-color:#405061;
line-height: 1em;
position: relative;
left: -1px;

View File

@ -30,6 +30,6 @@ button:disabled {
cursor: auto;
}
button.clear {
color: #888;
color: #333;
margin-bottom: 12px;
}

View File

@ -1,11 +1,11 @@
# Building with Bazel
This guide explains how to build and test Angular apps with Bazel.
This guide explains how to build and test Angular apps with Bazel.
<div class="alert is-helpful">
This guide assumes you are already familiar with developing and building Angular applications using the [CLI](cli).
This guide assumes you are already familiar with developing and building Angular applications using the [CLI](cli).
It describes features which are part of Angular Labs, and are not considered a stable, supported API.
@ -33,7 +33,7 @@ then create the new application with
ng new --collection=@angular/bazel
```
Now when you use Angular CLI build commands such as `ng build` and `ng serve`,
Now when you use Angular CLI build commands such as `ng build` and `ng serve`,
Bazel is used behind the scenes.
Outputs from Bazel appear in the `dist/bin` folder.
@ -45,7 +45,6 @@ Outputs from Bazel appear in the `dist/bin` folder.
If you need to opt-out from using Bazel, you can restore the backup files:
- `/angular.json.bak` replaces `/angular.json`
- `/tsconfig.json.bak` replaces `/tsconfig.json`
## Advanced configuration
@ -63,7 +62,7 @@ You can manually adjust the Bazel configuration to:
* customize the build steps
* parallellize the build for scale and incrementality
Create the initial Bazel configuration files by running the following command:
Create the initial Bazel configuration files by running the following command:
```sh
ng build --leaveBazelFilesOnDisk
@ -120,4 +119,4 @@ Rules are used in `BUILD.bazel` files, which are markers for the packages in you
In the `BUILD.bazel` file, each rule must first be imported, using the `load` statement. Then the rule is called with some attributes, and the result of calling the rule is that you've declared to Bazel how it can derive some outputs given some inputs and dependencies. Then later, when you run a `bazel` command line, Bazel loads all the rules you've declared to determine an absolute ordering of what needs to be run. Note that only the rules needed to produce the requested output will actually be executed.
A list of common rules for frontend development is documented in the README at https://github.com/bazelbuild/rules_nodejs/.
A list of common rules for frontend development is documented in the README at https://github.com/bazelbuild/rules_nodejs/.

View File

@ -371,24 +371,24 @@ so the <code>@Directive</code> configuration applies to components as well</p>
<td><p>The provided classes are added to the element when the <code>routerLink</code> becomes the current active route.</p>
</td>
</tr><tr>
<td><code>class <b>CanActivate</b>Guard implements <b>CanActivate</b> {<br> canActivate(<br> route: ActivatedRouteSnapshot,<br> state: RouterStateSnapshot<br> ): Observable&lt;boolean&gt;|Promise&lt;boolean&gt;|boolean { ... }<br>}<br><br>{ path: ..., canActivate: [<b>CanActivate</b>Guard] }</code></td>
<td><p>An interface for defining a class that the router should call first to determine if it should activate this component. Should return a boolean or an Observable/Promise that resolves to a boolean.</p>
<td><code>class <b>CanActivate</b>Guard implements <b>CanActivate</b> {<br> canActivate(<br> route: ActivatedRouteSnapshot,<br> state: RouterStateSnapshot<br> ): Observable&lt;boolean|UrlTree&gt;|Promise&lt;boolean|UrlTree&gt;|boolean|UrlTree { ... }<br>}<br><br>{ path: ..., canActivate: [<b>CanActivate</b>Guard] }</code></td>
<td><p>An interface for defining a class that the router should call first to determine if it should activate this component. Should return a boolean|UrlTree or an Observable/Promise that resolves to a boolean|UrlTree.</p>
</td>
</tr><tr>
<td><code>class <b>CanDeactivate</b>Guard implements <b>CanDeactivate</b>&lt;T&gt; {<br> canDeactivate(<br> component: T,<br> route: ActivatedRouteSnapshot,<br> state: RouterStateSnapshot<br> ): Observable&lt;boolean&gt;|Promise&lt;boolean&gt;|boolean { ... }<br>}<br><br>{ path: ..., canDeactivate: [<b>CanDeactivate</b>Guard] }</code></td>
<td><p>An interface for defining a class that the router should call first to determine if it should deactivate this component after a navigation. Should return a boolean or an Observable/Promise that resolves to a boolean.</p>
<td><code>class <b>CanDeactivate</b>Guard implements <b>CanDeactivate</b>&lt;T&gt; {<br> canDeactivate(<br> component: T,<br> route: ActivatedRouteSnapshot,<br> state: RouterStateSnapshot<br> ): Observable&lt;boolean|UrlTree&gt;|Promise&lt;boolean|UrlTree&gt;|boolean|UrlTree { ... }<br>}<br><br>{ path: ..., canDeactivate: [<b>CanDeactivate</b>Guard] }</code></td>
<td><p>An interface for defining a class that the router should call first to determine if it should deactivate this component after a navigation. Should return a boolean|UrlTree or an Observable/Promise that resolves to a boolean|UrlTree.</p>
</td>
</tr><tr>
<td><code>class <b>CanActivateChild</b>Guard implements <b>CanActivateChild</b> {<br> canActivateChild(<br> route: ActivatedRouteSnapshot,<br> state: RouterStateSnapshot<br> ): Observable&lt;boolean&gt;|Promise&lt;boolean&gt;|boolean { ... }<br>}<br><br>{ path: ..., canActivateChild: [CanActivateGuard],<br> children: ... }</code></td>
<td><p>An interface for defining a class that the router should call first to determine if it should activate the child route. Should return a boolean or an Observable/Promise that resolves to a boolean.</p>
<td><code>class <b>CanActivateChild</b>Guard implements <b>CanActivateChild</b> {<br> canActivateChild(<br> route: ActivatedRouteSnapshot,<br> state: RouterStateSnapshot<br> ): Observable&lt;boolean|UrlTree&gt;|Promise&lt;boolean|UrlTree&gt;|boolean|UrlTree { ... }<br>}<br><br>{ path: ..., canActivateChild: [CanActivateGuard],<br> children: ... }</code></td>
<td><p>An interface for defining a class that the router should call first to determine if it should activate the child route. Should return a boolean|UrlTree or an Observable/Promise that resolves to a boolean|UrlTree.</p>
</td>
</tr><tr>
<td><code>class <b>Resolve</b>Guard implements <b>Resolve</b>&lt;T&gt; {<br> resolve(<br> route: ActivatedRouteSnapshot,<br> state: RouterStateSnapshot<br> ): Observable&lt;any&gt;|Promise&lt;any&gt;|any { ... }<br>}<br><br>{ path: ..., resolve: [<b>Resolve</b>Guard] }</code></td>
<td><p>An interface for defining a class that the router should call first to resolve route data before rendering the route. Should return a value or an Observable/Promise that resolves to a value.</p>
</td>
</tr><tr>
<td><code>class <b>CanLoad</b>Guard implements <b>CanLoad</b> {<br> canLoad(<br> route: Route<br> ): Observable&lt;boolean&gt;|Promise&lt;boolean&gt;|boolean { ... }<br>}<br><br>{ path: ..., canLoad: [<b>CanLoad</b>Guard], loadChildren: ... }</code></td>
<td><p>An interface for defining a class that the router should call first to check if the lazy loaded module should be loaded. Should return a boolean or an Observable/Promise that resolves to a boolean.</p>
<td><code>class <b>CanLoad</b>Guard implements <b>CanLoad</b> {<br> canLoad(<br> route: Route<br> ): Observable&lt;boolean|UrlTree&gt;|Promise&lt;boolean|UrlTree&gt;|boolean|UrlTree { ... }<br>}<br><br>{ path: ..., canLoad: [<b>CanLoad</b>Guard], loadChildren: ... }</code></td>
<td><p>An interface for defining a class that the router should call first to check if the lazy loaded module should be loaded. Should return a boolean|UrlTree or an Observable/Promise that resolves to a boolean|UrlTree.</p>
</td>
</tr>
</tbody></table>

View File

@ -106,10 +106,11 @@ if some ancestor element has the CSS class `theme-light`.
Component styles normally apply only to the HTML in the component's own template.
Use the `/deep/` shadow-piercing descendant combinator to force a style down through the child
component tree into all the child component views.
The `/deep/` combinator works to any depth of nested components, and it applies to both the view
children and content children of the component.
Applying the `::ng-deep` pseudo-class to any CSS rule completely disables view-encapsulation for
that rule. Any style with `::ng-deep` applied becomes a global style. In order to scope the specified style
to the current component and all its descendants, be sure to include the `:host` selector before
`::ng-deep`. If the `::ng-deep` combinator is used without the `:host` pseudo-class selector, the style
can bleed into other components.
The following example targets all `<h3>` elements, from the host element down
through this component to all of its child elements in the DOM.

View File

@ -318,8 +318,6 @@ The need for this polyfill was removed in Angular version 8.0 ([see #14473](http
In a typical Angular project, the polyfill is not used in production builds, so removing it should not impact production applications. The goal behind this removal is overall simplification of the build setup and decrease in the number of external dependencies.
We expect to remove the polyfill from most if not all CLI projects via an `ng upgrade` migration from version 8 to 9.
{@a static-query-resolution}
### `@ViewChild()` / `@ContentChild()` static resolution as the default
@ -348,13 +346,13 @@ In the following example, the two-way binding means that `optionName`
should be written when the `valueChange` event fires.
```html
<option *ngFor="let optionName of options" [(value)]="optionName"></cmp>
<option *ngFor="let optionName of options" [(value)]="optionName"></option>
```
However, in practice, Angular simply ignores two-way bindings to template variables. Starting in version 8, attempting to write to template variables is deprecated. In a future version, we will throw to indicate that the write is not supported.
```html
<option *ngFor="let optionName of options" [value]="optionName"></cmp>
<option *ngFor="let optionName of options" [value]="optionName"></option>
```
{@a binding-to-innertext}
@ -369,33 +367,27 @@ These two properties have subtle differences, so switching to `textContent` unde
All of the `wtf*` APIs are deprecated and will be removed in a future version.
{@a platform-webworker}
### `platform-webworker`
The `@angular/platform-*` packages enable Angular to be run in different contexts. Some examples are running Angular on the server (`@angular/platform-server`), in the browser (`@angular/platform-browser`), or in a [web worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) (`@angular/platform-webworker`).
Though web worker is useful to offload things requiring lots of processing, pushing whole apps to run in the web worker isn't a winning strategy due to many unresolved issues.
Angular CLI doesn't allow use of these APIs because the build system and bundling doesn't support them. This whole package is deprecated in Angular version 8 and will be removed in the future.
Instead, use web workers primarily for offloading CPU intensive, but functionally not critical, work needed for initial rendering (for example, in memory search, image processing, and so on).
{@a webworker-apps}
### platform-webworker Angular applications
### Running Angular applications in platform-webworker
The `@angular/platform-*` packages enable Angular to be run in different contexts. For examples,
`@angular/platform-server` enables Angular to be run on the server, and `@angular/platform-browser`
enables Angular to be run in a web browser.
platform-webworker has been around since the initial release of Angular version 2. It began as an experiment to leverage Angular's rendering architecture and try something different: to run an entire web application in a web worker.
`@angular/platform-webworker` was introduced in Angular version 2 as an experiment in leveraging
Angular's rendering architecture to run an entire web application in a
[web worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API). We've learned a lot
from this experiment and have come to the conclusion that running the entire application in a web
worker is not the best strategy for most applications.
We've learned a lot from this experiment, and have come to the conclusion that pushing entire applications to run in a web worker is not a recipe for success for most applications. This is due to a number of unresolved issues, including:
Going forward, we will focus our efforts related to web workers around their primary use case of
offloading CPU-intensive, non-critical work needed for initial rendering (such as in-memory search
and image processing). Learn more in the
[guide to Using Web Workers with the Angular CLI](guide/web-worker).
* Poor or non-existent support for web worker APIs in web crawlers/indexers.
* Poor support in build and bundling tooling.
As a result, as of Angular version 8, we are deprecating the `platform-webworker` APIs in Angular. This consists of both NPM packages, `@angular/platform-webworker` and `@angular/platform-webworker-dynamic`.
Going forward, we will focus our efforts related to web workers around their primary use case of offloading CPU-intensive but not critical work.
As of Angular version 8, all `platform-webworker` APIs are deprecated.
This includes both packages: `@angular/platform-webworker` and
`@angular/platform-webworker-dynamic`.
{@a removed}
## Removed APIs

View File

@ -1,10 +1,10 @@
# Angular Elements Overview
_Angular elements_ are Angular components packaged as _custom elements_, a web standard for defining new HTML elements in a framework-agnostic way.
_Angular elements_ are Angular components packaged as _custom elements_ (also called Web Components), a web standard for defining new HTML elements in a framework-agnostic way.
[Custom elements](https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements) are a Web Platform feature currently supported by Chrome, Firefox, Opera, and Safari, and available in other browsers through polyfills (see [Browser Support](#browser-support)).
A custom element extends HTML by allowing you to define a tag whose content is created and controlled by JavaScript code.
The browser maintains a `CustomElementRegistry` of defined custom elements (also called Web Components), which maps an instantiable JavaScript class to an HTML tag.
The browser maintains a `CustomElementRegistry` of defined custom elements, which maps an instantiable JavaScript class to an HTML tag.
The `@angular/elements` package exports a `createCustomElement()` API that provides a bridge from Angular's component interface and change detection functionality to the built-in DOM API.

View File

@ -362,11 +362,12 @@ Compare to [custom element](#custom-element).
## entry point
A JavaScript symbol that makes parts of an [npm package](guide/npm-packages) available for import by other code.
The Angular [scoped packages](#scoped-package) each have an entry point named `index`.
Within Angular, use [NgModules](#ngmodule) to make public parts available for import by other NgModules.
A JavaScript module(#module) that is intended to be imported by a user of [an
npm package](guide/npm-packages). An entry-point module typically re-exports
symbols from other internal modules. A package can contain multiple
entry points. For example, the `@angular/core` package has two entry-point
modules, which can be imported using the module names `@angular/core` and
`@angular/core/testing`.
{@a F}
@ -621,6 +622,19 @@ A class which is preceded by the `@Pipe{}` decorator and which defines a functio
To learn more, see [Pipes](guide/pipes).
{@a platform}
## platform
In Angular terminology, a platform is the context in which an Angular application runs.
The most common platform for Angular applications is a web browser, but it can also be an operating system for a mobile device, or a web server.
Support for the various Angular run-time platforms is provided by the `@angular/platform-*` packages. These packages allow applications that make use of `@angular/core` and `@angular/common` to execute in different environments by providing implementation for gathering user input and rendering UIs for the given platform. Isolating platform-specific functionality allows the developer to make platform-independent use of the rest of the framework.
* When running in a web browser, [`BrowserModule`](api/platform-browser/BrowserModule) is imported from the `platform-browser` package, and supports services that simplify security and event processing, and allows applications to access browser-specific features, such as interpreting keyboard input and controlling the title of the document being displayed. All applications running in the browser use the same platform service.
* When [server-side rendering](#server-side-rendering) (SSR) is used, the [`platform-server`](api/platform-server) package provides web server implementations of the `DOM`, `XMLHttpRequest`, and other low-level features that don't rely on a browser.
{@a polyfill}
## polyfill

View File

@ -49,7 +49,7 @@ AOT compilation with Ivy is faster and should be used by default. In the `angula
}
}
}
```
To stop using the Ivy compiler, set `enableIvy` to `false` in `tsconfig.app.json`, or remove it completely. Also remove `"aot": true` from your default build options if you didn't have it there before.

View File

@ -548,7 +548,7 @@ It displays the same hero data in JSON format by chaining through to the built-i
The [JsonPipe](api/common/JsonPipe)
provides an easy way to diagnosis a mysteriously failing data binding or
provides an easy way to diagnose a mysteriously failing data binding or
inspect an object for future binding.

View File

@ -92,9 +92,9 @@ The following table contains our current target release dates for the next two m
Date | Stable Release | Compatibility
---------------------- | -------------- | -------------
May 2019 | 8.0.0 | ^7.0.0
October/November 2019 | 9.0.0 | ^8.0.0
May 2020 | 10.0.0 | ^9.0.0
Compatibility note: The primary goal of the backward compatibility promise is to ensure that changes in the core framework and tooling don't break the existing ecosystem of components and applications and don't put undue upgrade/migration burden on Angular application and component authors.
@ -115,7 +115,7 @@ The following table provides the status for Angular versions under support.
Version | Status | Released | Active Ends | LTS Ends
------- | ------ | ------------ | ------------ | ------------
^8.0.0 | Active | May 22, 2019 | Nov 22, 2019 | Nov 22, 2020
^8.0.0 | Active | May 28, 2019 | Nov 28, 2019 | Nov 28, 2020
^7.0.0 | LTS | Oct 18, 2018 | Apr 18, 2019 | Apr 18, 2020
^6.0.0 | LTS | May 3, 2018 | Nov 3, 2018 | Nov 3, 2019

View File

@ -59,6 +59,13 @@ With the server running, you can point your browser at http://localhost:8080/. Y
**Tip:** When testing Angular service workers, it's a good idea to use an incognito or private window in your browser to ensure the service worker doesn't end up reading from a previous leftover state, which can cause unexpected behavior.
<div class="alert is-helpful">
**Note:**
If you are not using HTTPS, the service worker will only be registered when accessing the app on `localhost`.
</div>
### Simulating a network issue
To simulate a network issue, disable network interaction for your application. In Chrome:
@ -156,4 +163,4 @@ The service worker installed the updated version of your app *in the background*
## More on Angular service workers
You may also be interested in the following:
* [Communicating with service workers](guide/service-worker-communications).
* [Communicating with service workers](guide/service-worker-communications).

View File

@ -6,16 +6,16 @@ At its simplest, a service worker is a script that runs in the web browser and m
Service workers function as a network proxy. They intercept all outgoing HTTP requests made by the application and can choose how to respond to them. For example, they can query a local cache and deliver a cached response if one is available. Proxying isn't limited to requests made through programmatic APIs, such as `fetch`; it also includes resources referenced in HTML and even the initial request to `index.html`. Service worker-based caching is thus completely programmable and doesn't rely on server-specified caching headers.
Unlike the other scripts that make up an application, such as the Angular app bundle, the service worker is preserved after the user closes the tab. The next time that browser loads the application, the service worker loads first, and can intercept every request for resources to load the application. If the service worker is designed to do so, it can *completely satisfy the loading of the application, without the need for the network*.
Unlike the other scripts that make up an application, such as the Angular app bundle, the service worker is preserved after the user closes the tab. The next time that browser loads the application, the service worker loads first, and can intercept every request for resources to load the application. If the service worker is designed to do so, it can *completely satisfy the loading of the application, without the need for the network*.
Even across a fast reliable network, round-trip delays can introduce significant latency when loading the application. Using a service worker to reduce dependency on the network can significantly improve the user experience.
Even across a fast reliable network, round-trip delays can introduce significant latency when loading the application. Using a service worker to reduce dependency on the network can significantly improve the user experience.
## Service workers in Angular
Angular applications, as single-page applications, are in a prime position to benefit from the advantages of service workers. Starting with version 5.0.0, Angular ships with a service worker implementation. Angular developers can take advantage of this service worker and benefit from the increased reliability and performance it provides, without needing to code against low-level APIs.
Angular's service worker is designed to optimize the end user experience of using an application over a slow or unreliable network connection, while also minimizing the risks of serving outdated content.
Angular's service worker is designed to optimize the end user experience of using an application over a slow or unreliable network connection, while also minimizing the risks of serving outdated content.
The Angular service worker's behavior follows that design goal:
@ -33,14 +33,18 @@ Installing the Angular service worker is as simple as including an `NgModule`. I
Your application must run in a web browser that supports service workers. Currently, service workers are supported in the latest versions of Chrome, Firefox, Edge, Safari, Opera, UC Browser (Android version) and Samsung Internet. Browsers like IE and Opera Mini do not provide the support. To learn more about other browsers that are service worker ready, see the [Can I Use](https://caniuse.com/#feat=serviceworkers) page and [MDN docs](https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API).
In addition, in order for service workers to be registered, the app must be accessed over HTTPS, not HTTP. Browsers will ignore service workers on pages that are served over an insecure connection. The reason is that service workers are quite powerful, so extra care needs to be taken to ensure the service worker script has not been tampered with.
There is one exception to this rule: To make local development easier, browsers do _not_ require a secure connection when accessing an app on `localhost`.
## Related resources
For more information about service workers in general, see [Service Workers: an Introduction](https://developers.google.com/web/fundamentals/primers/service-workers/).
For more information about service workers in general, see [Service Workers: an Introduction](https://developers.google.com/web/fundamentals/primers/service-workers/).
For more information about browser support, see the [browser support](https://developers.google.com/web/fundamentals/primers/service-workers/#browser_support) section of [Service Workers: an Introduction](https://developers.google.com/web/fundamentals/primers/service-workers/), Jake Archibald's [Is Serviceworker ready?](https://jakearchibald.github.io/isserviceworkerready/), and
[Can I Use](http://caniuse.com/#feat=serviceworkers).
For more information about browser support, see the [browser support](https://developers.google.com/web/fundamentals/primers/service-workers/#browser_support) section of [Service Workers: an Introduction](https://developers.google.com/web/fundamentals/primers/service-workers/), Jake Archibald's [Is Serviceworker ready?](https://jakearchibald.github.io/isserviceworkerready/), and
[Can I Use](http://caniuse.com/#feat=serviceworkers).
The remainder of this Angular documentation specifically addresses the Angular implementation of service workers.
The remainder of this Angular documentation specifically addresses the Angular implementation of service workers.
## More on Angular service workers

View File

@ -106,7 +106,7 @@ Many libraries include definition files in their npm packages where both the Typ
can find them. Angular is one such library.
The `node_modules/@angular/core/` folder of any Angular application contains several `d.ts` files that describe parts of Angular.
**You need to do nothing to get *typings* files for library packages that include `d.ts` files.
**You don't need to do anything to get *typings* files for library packages that include `d.ts` files.
Angular packages include them already.**
### lib.d.ts

View File

@ -1177,7 +1177,7 @@ Finally, you should add some npm scripts in `package.json` to compile the TypeSc
JavaScript (based on the `tsconfig.json` configuration file):
<code-example format="">
"script": {
"scripts": {
"tsc": "tsc",
"tsc:w": "tsc -w",
...

View File

@ -15,8 +15,7 @@ include the following information:
- For Schematics commands (add, generate, new and update), a list of whitelisted flags.
- For build commands (build, serve), the number and size of bundles (initial and lazy),
compilation units, the time it took to build and rebuild, and basic Angular-specific
API usage. *This data is collected only if usage analytics gathering is enabled for
the project.*
API usage.
- Error code of exceptions and crash data. No stack trace is collected.
Only Angular owned and developed schematics and builders are reported. Third-party schematics and
@ -26,9 +25,6 @@ builders do not send data to the Angular Team.
When installing the Angular CLI or upgrading an existing version, you are prompted to allow global
collection of usage statistics. If you say no or skip the prompt, no data is collected.
The first time a command affecting the project is run, you are prompted to allow collection of data
related to the project. If you say no or skip the prompt, no data is collected for that project.
Starting with version 8, we added the `analytics` command to the CLI. You can change your opt-in
decision at any time using this command.
@ -38,9 +34,6 @@ To disable analytics gathering, run the following command:
```bash
# Disable all usage analytics.
ng analytics off
# Disable project-specific usage analytics.
ng analytics project off
```
### Enabling usage analytics
@ -49,9 +42,6 @@ To enable usage analytics, run the following command:
```bash
# Enable all usage analytics.
ng analytics on
# Enable project-specific usage analytics.
ng analytics project on
```
### Prompting
@ -60,7 +50,4 @@ To prompt the user again about usage analytics, run the following command:
```bash
# Prompt for all usage analytics.
ng analytics prompt
# Prompt for project-specific usage analytics.
ng analytics project prompt
```

View File

@ -28,6 +28,11 @@
"rev": true,
"title": "Angular Subreddit",
"url": "https://www.reddit.com/r/Angular2/"
},
"angular-devto" : {
"url": "https://dev.to/t/angular",
"rev": true,
"title": "Read and share content and chat about Angular on DEV Community."
}
}
},

View File

@ -788,7 +788,7 @@
{
"url": "events",
"title": "Events",
"tooltip": "Post issues and suggestions on github."
"tooltip": "Angular events around the world."
},
{
"url": "http://www.meetup.com/topics/angularjs/",
@ -831,21 +831,25 @@
}
],
"docVersions": [
{
"title": "v7",
"url": "https://v7.angular.io/"
},
{
"title": "v6",
"url": "https://v6.angular.io"
"url": "https://v6.angular.io/"
},
{
"title": "v5",
"url": "https://v5.angular.io"
"url": "https://v5.angular.io/"
},
{
"title": "v4",
"url": "https://v4.angular.io"
"url": "https://v4.angular.io/"
},
{
"title": "v2",
"url": "https://v2.angular.io"
"url": "https://v2.angular.io/"
}
]
}

View File

@ -6,7 +6,7 @@ Users can click on a product name from the list to see details in a new view, wi
In this section, you'll create the shopping cart. You'll:
* Update the product details page to include a "Buy" button, which adds the current product to a list of products managed by a cart service.
* Add a cart component, which displays the items you added to your cart.
* Add a shipping component, which retrieves shipping prices for the items in the cart by using Angular's HttpClient to retrieve shipping data from a `.json` file.
* Add a shipping component, which retrieves shipping prices for the items in the cart by using Angular's `HttpClient` to retrieve shipping data from a `.json` file.
{@a services}
## Services
@ -34,7 +34,7 @@ Later, in the [Forms](start/forms "Getting Started: Forms") part of this tutoria
1. Generate a cart service.
1. Right click on the `app` folder, choose `Angular Generator`, and choose `**Service**`. Name the new service `cart`.
1. Right click on the `app` folder, choose `Angular Generator`, and choose `Service`. Name the new service `cart`.
<code-example header="src/app/cart.service.ts" path="getting-started/src/app/cart.service.1.ts"></code-example>
@ -238,7 +238,7 @@ In this section, you'll use the HTTP client to retrieve shipping prices from an
### Predefined shipping data
For the purpose of this Getting Started, we have provided shipping data in `assets/shipping.json`.
For the purpose of this Getting Started guide, we have provided shipping data in `assets/shipping.json`.
You'll use this data to add shipping prices for items in the cart.
<code-example header="src/assets/shipping.json" path="getting-started/src/assets/shipping.json">
@ -306,7 +306,7 @@ Here you'll define the `get()` method that will be used.
<div class="alert is-helpful">
Learn more: See the [HttpClient guide](guide/http "HttpClient guide") for more information about Angular's HttpClient.
Learn more: See the [HttpClient guide](guide/http "HttpClient guide") for more information about Angular's `HttpClient`.
</div>

View File

@ -26,7 +26,7 @@ StackBlitz projects are public by default, allowing you to share your Angular ap
To build your application locally or for production, you will need to download the source code from your StackBlitz project. Click the `Download Project` icon in the left menu across from `Project` to download your files.
Once you have the source code downloaded and unzipped, use the [Angular Console](https://angularconsole.com "Angular Console web site") to serve the application, or you install Node and have the Angular CLI installed.
Once you have the source code downloaded and unzipped, use the [Angular Console](https://angularconsole.com "Angular Console web site") to serve the application, or you install `Node.js` and have the Angular CLI installed.
From the terminal, install the Angular CLI globally with:
@ -52,7 +52,7 @@ This will produce the files that you need to deploy.
#### Hosting the built project
The files in the `dist/my-project-name` folder are static and can be hosted on any web server capable of serving files (node, Java, .NET) or any backend (Firebase, Google Cloud, App Engine, others).
The files in the `dist/my-project-name` folder are static and can be hosted on any web server capable of serving files (`Node.js`, Java, .NET) or any backend (Firebase, Google Cloud, App Engine, others).
### Hosting an Angular app on Firebase

View File

@ -11,7 +11,7 @@ You don't need to install anything: you'll build the app using the [StackBlitz](
<header>New to web development?</header>
You'll find many resources to complement the Angular docs. Mozilla's MDN docs include both [HTML](https://developer.mozilla.org/en-US/docs/Learn/HTML "Learning HTML: Guides and tutorials") and [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript "JavaScript") introductions. [TypeScript's docs](https://www.typescriptlang.org/docs/home.html "TypeScript documentation") include a 5-minute tutorial. Various online course platforms, such as [Udemy](http://www.udemy.com "Udemy online courses") and [Codeacademy](https://www.codecademy.com/ "Codeacademy online courses"), also cover web development basics.
You'll find many resources to complement the Angular docs. Mozilla's MDN docs include both [HTML](https://developer.mozilla.org/en-US/docs/Learn/HTML "Learning HTML: Guides and tutorials") and [JavaScript](https://developer.mozilla.org/en-US/docs/Web/JavaScript "JavaScript") introductions. [TypeScript's docs](https://www.typescriptlang.org/docs/home.html "TypeScript documentation") include a 5-minute tutorial. Various online course platforms, such as [Udemy](http://www.udemy.com "Udemy online courses") and [Codecademy](https://www.codecademy.com/ "Codeacademy online courses"), also cover web development basics.
</div>
@ -69,7 +69,9 @@ In this section, you'll learn about template syntax by enhancing the "Products"
`*ngFor` causes the `<div>` to be repeated for each product in the list.
<div class="alert is-helpful">
`*ngFor` is a "structural directive". Structural directives shape or reshape the DOM's structure, typically by adding, removing, and manipulating the elements to which they are attached. Any directive with an * is a structural directive.
`*ngFor` is a "structural directive". Structural directives shape or reshape the DOM's structure, typically by adding, removing, and manipulating the elements to which they are attached. Any directive with an `*` is a structural directive.
</div>
1. To display the names of the products, use the interpolation syntax {{ }}. Interpolation renders a property's value as text. Inside the `<div>`, add an `<h3>` heading to display the interpolation of the product's name property:
@ -131,9 +133,9 @@ The app now has a product list and sharing feature.
In the process, you've learned to use five common features of Angular's template syntax:
* `*ngFor`
* `*ngIf`
* Interpolation {{ }}
* Property binding [ ]
* Event binding ( )
* Interpolation `{{ }}`
* Property binding `[ ]`
* Event binding `( )`
<div class="alert is-helpful">

View File

@ -56,8 +56,24 @@ Install the *In-memory Web API* package from _npm_
npm install angular-in-memory-web-api --save
</code-example>
Import the `HttpClientInMemoryWebApiModule` and the `InMemoryDataService` class,
which you will create in a moment.
The class `src/app/in-memory-data.service.ts` is generated by the following command:
<code-example language="sh" class="code-shell">
ng generate service InMemoryData
</code-example>
This class has the following content:
<code-example path="toh-pt6/src/app/in-memory-data.service.ts" region="init" header="src/app/in-memory-data.service.ts" linenums="false"></code-example>
This file replaces `mock-heroes.ts`, which is now safe to delete.
When your server is ready, detach the *In-memory Web API*, and the app's requests will go through to the server.
Now back to the `HttpClient` story.
Import the `HttpClientInMemoryWebApiModule` and the `InMemoryDataService` class.
<code-example
path="toh-pt6/src/app/app.module.ts"
@ -77,22 +93,6 @@ _after importing the `HttpClientModule`_,
The `forRoot()` configuration method takes an `InMemoryDataService` class
that primes the in-memory database.
The class `src/app/in-memory-data.service.ts` is generated by the following command:
<code-example language="sh" class="code-shell">
ng generate service InMemoryData
</code-example>
This class has the following content:
<code-example path="toh-pt6/src/app/in-memory-data.service.ts" region="init" header="src/app/in-memory-data.service.ts" linenums="false"></code-example>
This file replaces `mock-heroes.ts`, which is now safe to delete.
When your server is ready, detach the *In-memory Web API*, and the app's requests will go through to the server.
Now back to the `HttpClient` story.
{@a import-heroes}
## Heroes and HTTP

View File

@ -19,7 +19,7 @@
"build-local": "yarn ~~build",
"prebuild-with-ivy": "yarn setup-local && node scripts/switch-to-ivy",
"build-with-ivy": "yarn ~~build",
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 9a3d36c98",
"extract-cli-command-docs": "node tools/transforms/cli-docs-package/extract-cli-commands.js 7da10691d",
"lint": "yarn check-env && yarn docs-lint && ng lint && yarn example-lint && yarn tools-lint",
"test": "yarn check-env && ng test",
"pree2e": "yarn check-env && yarn update-webdriver",
@ -76,28 +76,28 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^8.0.0-rc.2",
"@angular/cdk": "8.0.0-rc.0",
"@angular/common": "^8.0.0-rc.2",
"@angular/core": "^8.0.0-rc.2",
"@angular/elements": "^8.0.0-rc.2",
"@angular/forms": "^8.0.0-rc.2",
"@angular/material": "8.0.0-rc.0",
"@angular/platform-browser": "^8.0.0-rc.2",
"@angular/platform-browser-dynamic": "^8.0.0-rc.2",
"@angular/router": "^8.0.0-rc.2",
"@angular/service-worker": "^8.0.0-rc.2",
"@angular/animations": "^8.1.0-next.1",
"@angular/cdk": "8.0.0",
"@angular/common": "^8.1.0-next.1",
"@angular/core": "^8.1.0-next.1",
"@angular/elements": "^8.1.0-next.1",
"@angular/forms": "^8.1.0-next.1",
"@angular/material": "8.0.0",
"@angular/platform-browser": "^8.1.0-next.1",
"@angular/platform-browser-dynamic": "^8.1.0-next.1",
"@angular/router": "^8.1.0-next.1",
"@angular/service-worker": "^8.1.0-next.1",
"@types/lunr": "^2.3.2",
"@webcomponents/custom-elements": "^1.2.0",
"rxjs": "^6.5.1",
"rxjs": "^6.5.2",
"zone.js": "^0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.800.0-rc.2",
"@angular/cli": "8.0.0-rc.2",
"@angular/compiler": "^8.0.0-rc.2",
"@angular/compiler-cli": "^8.0.0-rc.2",
"@angular/language-service": "^8.0.0-rc.2",
"@angular-devkit/build-angular": "0.800.2",
"@angular/cli": "8.0.2",
"@angular/compiler": "^8.1.0-next.1",
"@angular/compiler-cli": "^8.1.0-next.1",
"@angular/language-service": "^8.1.0-next.1",
"@types/jasmine": "^2.5.52",
"@types/jasminewd2": "^2.0.4",
"@types/node": "~6.0.60",
@ -167,4 +167,4 @@
"xregexp": "^4.0.0",
"yargs": "^7.0.2"
}
}
}

View File

@ -2,12 +2,12 @@
"aio": {
"master": {
"uncompressed": {
"runtime-es5": 2980,
"runtime-es2015": 2986,
"main-es5": 504760,
"main-es2015": 443497,
"polyfills-es5": 128751,
"polyfills-es2015": 53147
"runtime-es5": 3005,
"runtime-es2015": 3011,
"main-es5": 511054,
"main-es2015": 450560,
"polyfills-es5": 129161,
"polyfills-es2015": 53295
}
}
}

View File

@ -13,8 +13,6 @@ const ROOT_DIR = resolve(__dirname, '..');
const NG_JSON = join(ROOT_DIR, 'angular.json');
const NG_COMPILER_OPTS = {
angularCompilerOptions: {
// Related Jira issue: FW-737
allowEmptyCodegenFiles: true,
enableIvy: true,
},
};

View File

@ -7,11 +7,12 @@ import { MatProgressBar } from '@angular/material/progress-bar';
import { MatSidenav } from '@angular/material/sidenav';
import { By } from '@angular/platform-browser';
import { of, timer } from 'rxjs';
import { Subject, of, timer } from 'rxjs';
import { first, mapTo } from 'rxjs/operators';
import { AppComponent } from './app.component';
import { AppModule } from './app.module';
import { CurrentNodes } from 'app/navigation/navigation.model';
import { DocumentService } from 'app/documents/document.service';
import { DocViewerComponent } from 'app/layout/doc-viewer/doc-viewer.component';
import { Deployment } from 'app/shared/deployment.service';
@ -22,7 +23,7 @@ import { Logger } from 'app/shared/logger.service';
import { MockLocationService } from 'testing/location.service';
import { MockLogger } from 'testing/logger.service';
import { MockSearchService } from 'testing/search.service';
import { NavigationNode } from 'app/navigation/navigation.service';
import { NavigationNode, NavigationService } from 'app/navigation/navigation.service';
import { ScrollService } from 'app/shared/scroll.service';
import { SearchBoxComponent } from 'app/search/search-box/search-box.component';
import { SearchResultsComponent } from 'app/shared/search-results/search-results.component';
@ -809,106 +810,43 @@ describe('AppComponent', () => {
});
describe('archive redirection', () => {
it('should redirect to `docs` if deployment mode is `archive` and not at a docs page', () => {
createTestingModule('', 'archive');
initializeTest(false);
expect(TestBed.get(LocationService).replace).toHaveBeenCalledWith('docs');
const redirectionPerMode: {[mode: string]: boolean} = {
archive: true,
next: false,
stable: false,
};
createTestingModule('resources', 'archive');
initializeTest(false);
expect(TestBed.get(LocationService).replace).toHaveBeenCalledWith('docs');
Object.keys(redirectionPerMode).forEach(mode => {
const doRedirect = redirectionPerMode[mode];
const description =
`should ${doRedirect ? '' : 'not '}redirect to 'docs' if deployment mode is '${mode}' ` +
'and at a marketing page';
const verifyNoRedirection = () => expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
const verifyRedirection = () => expect(TestBed.get(LocationService).replace).toHaveBeenCalledWith('docs');
const verifyPossibleRedirection = doRedirect ? verifyRedirection : verifyNoRedirection;
createTestingModule('guide/aot-compiler', 'archive');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
it(description, () => {
createTestingModule('', mode);
createTestingModule('tutorial', 'archive');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
const navService = TestBed.get(NavigationService) as NavigationService;
const testCurrentNodes = navService.currentNodes = new Subject<CurrentNodes>();
createTestingModule('tutorial/toh-pt1', 'archive');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
initializeTest(false);
createTestingModule('docs', 'archive');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
testCurrentNodes.next({SideNav: {url: 'foo', view: 'SideNav', nodes: []}});
verifyNoRedirection();
createTestingModule('api', 'archive');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
testCurrentNodes.next({NoSideNav: {url: 'bar', view: 'SideNav', nodes: []}});
verifyPossibleRedirection();
createTestingModule('api/core/getPlatform', 'archive');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
});
locationService.replace.calls.reset();
testCurrentNodes.next({});
verifyPossibleRedirection();
it('should not redirect if deployment mode is `next`', () => {
createTestingModule('', 'next');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('resources', 'next');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('guide/aot-compiler', 'next');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('tutorial', 'next');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('tutorial/toh-pt1', 'next');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('docs', 'next');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('api', 'next');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('api/core/getPlatform', 'next');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
});
it('should not redirect to `docs` if deployment mode is `stable`', () => {
createTestingModule('', 'stable');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('resources', 'stable');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('guide/aot-compiler', 'stable');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('tutorial', 'stable');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('tutorial/toh-pt1', 'stable');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('docs', 'stable');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('api', 'stable');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
createTestingModule('api/core/getPlatform', 'stable');
initializeTest(false);
expect(TestBed.get(LocationService).replace).not.toHaveBeenCalled();
locationService.replace.calls.reset();
testCurrentNodes.next({SideNav: {url: 'baz', view: 'SideNav', nodes: []}});
verifyNoRedirection();
});
});
});
});

View File

@ -120,11 +120,6 @@ export class AppComponent implements OnInit {
this.documentService.currentDocument.subscribe(doc => this.currentDocument = doc);
this.locationService.currentPath.subscribe(path => {
// Redirect to docs if we are in archive mode and are not hitting a docs page
// (i.e. we have arrived at a marketing page)
if (this.deployment.mode === 'archive' && !/^(docs$|api|guide|tutorial)/.test(path)) {
this.locationService.replace('docs');
}
if (path === this.currentPath) {
// scroll only if on same page (most likely a change to the hash)
this.scrollService.scroll();
@ -138,7 +133,15 @@ export class AppComponent implements OnInit {
}
});
this.navigationService.currentNodes.subscribe(currentNodes => this.currentNodes = currentNodes);
this.navigationService.currentNodes.subscribe(currentNodes => {
this.currentNodes = currentNodes;
// Redirect to docs if we are in archive mode and are not hitting a docs page
// (i.e. we have arrived at a marketing page)
if (this.deployment.mode === 'archive' && !currentNodes[sideNavView]) {
this.locationService.replace('docs');
}
});
// Compute the version picker list from the current version and the versions in the navigation map
combineLatest(

View File

@ -1,10 +1,10 @@
import { NgModule, NgModuleFactoryLoader, SystemJsNgModuleLoader } from '@angular/core';
import { NgModule } from '@angular/core';
import { ROUTES} from '@angular/router';
import { ElementsLoader } from './elements-loader';
import {
ELEMENT_MODULE_PATHS,
ELEMENT_MODULE_PATHS_AS_ROUTES,
ELEMENT_MODULE_PATHS_TOKEN
ELEMENT_MODULE_LOAD_CALLBACKS,
ELEMENT_MODULE_LOAD_CALLBACKS_AS_ROUTES,
ELEMENT_MODULE_LOAD_CALLBACKS_TOKEN
} from './element-registry';
import { LazyCustomElementComponent } from './lazy-custom-element.component';
@ -13,13 +13,12 @@ import { LazyCustomElementComponent } from './lazy-custom-element.component';
exports: [ LazyCustomElementComponent ],
providers: [
ElementsLoader,
{ provide: NgModuleFactoryLoader, useClass: SystemJsNgModuleLoader },
{ provide: ELEMENT_MODULE_PATHS_TOKEN, useValue: ELEMENT_MODULE_PATHS },
{ provide: ELEMENT_MODULE_LOAD_CALLBACKS_TOKEN, useValue: ELEMENT_MODULE_LOAD_CALLBACKS },
// Providing these routes as a signal to the build system that these modules should be
// registered as lazy-loadable.
// TODO(andrewjs): Provide first-class support for providing this.
{ provide: ROUTES, useValue: ELEMENT_MODULE_PATHS_AS_ROUTES, multi: true },
{ provide: ROUTES, useValue: ELEMENT_MODULE_LOAD_CALLBACKS_AS_ROUTES, multi: true },
],
})
export class CustomElementsModule { }

View File

@ -1,44 +1,45 @@
import { InjectionToken, Type } from '@angular/core';
import { LoadChildrenCallback } from '@angular/router';
// Modules containing custom elements must be set up as lazy-loaded routes (loadChildren)
// TODO(andrewjs): This is a hack, Angular should have first-class support for preparing a module
// that contains custom elements.
export const ELEMENT_MODULE_PATHS_AS_ROUTES = [
export const ELEMENT_MODULE_LOAD_CALLBACKS_AS_ROUTES = [
{
selector: 'aio-announcement-bar',
loadChildren: './announcement-bar/announcement-bar.module#AnnouncementBarModule'
loadChildren: () => import('./announcement-bar/announcement-bar.module').then(mod => mod.AnnouncementBarModule)
},
{
selector: 'aio-api-list',
loadChildren: './api/api-list.module#ApiListModule'
loadChildren: () => import('./api/api-list.module').then(mod => mod.ApiListModule)
},
{
selector: 'aio-contributor-list',
loadChildren: './contributor/contributor-list.module#ContributorListModule'
loadChildren: () => import('./contributor/contributor-list.module').then(mod => mod.ContributorListModule)
},
{
selector: 'aio-file-not-found-search',
loadChildren: './search/file-not-found-search.module#FileNotFoundSearchModule'
loadChildren: () => import('./search/file-not-found-search.module').then(mod => mod.FileNotFoundSearchModule)
},
{
selector: 'aio-resource-list',
loadChildren: './resource/resource-list.module#ResourceListModule'
loadChildren: () => import('./resource/resource-list.module').then(mod => mod.ResourceListModule)
},
{
selector: 'aio-toc',
loadChildren: './toc/toc.module#TocModule'
loadChildren: () => import('./toc/toc.module').then(mod => mod.TocModule)
},
{
selector: 'code-example',
loadChildren: './code/code-example.module#CodeExampleModule'
loadChildren: () => import('./code/code-example.module').then(mod => mod.CodeExampleModule)
},
{
selector: 'code-tabs',
loadChildren: './code/code-tabs.module#CodeTabsModule'
loadChildren: () => import('./code/code-tabs.module').then(mod => mod.CodeTabsModule)
},
{
selector: 'live-example',
loadChildren: './live-example/live-example.module#LiveExampleModule'
loadChildren: () => import('./live-example/live-example.module').then(mod => mod.LiveExampleModule)
}
];
@ -51,10 +52,10 @@ export interface WithCustomElementComponent {
}
/** Injection token to provide the element path modules. */
export const ELEMENT_MODULE_PATHS_TOKEN = new InjectionToken('aio/elements-map');
export const ELEMENT_MODULE_LOAD_CALLBACKS_TOKEN = new InjectionToken<Map<string, LoadChildrenCallback>>('aio/elements-map');
/** Map of possible custom element selectors to their lazy-loadable module paths. */
export const ELEMENT_MODULE_PATHS = new Map<string, string>();
ELEMENT_MODULE_PATHS_AS_ROUTES.forEach(route => {
ELEMENT_MODULE_PATHS.set(route.selector, route.loadChildren);
export const ELEMENT_MODULE_LOAD_CALLBACKS = new Map<string, LoadChildrenCallback>();
ELEMENT_MODULE_LOAD_CALLBACKS_AS_ROUTES.forEach(route => {
ELEMENT_MODULE_LOAD_CALLBACKS.set(route.selector, route.loadChildren);
});

View File

@ -1,13 +1,14 @@
import {
Compiler,
ComponentFactory,
ComponentFactoryResolver, ComponentRef, Injector, NgModuleFactory, NgModuleFactoryLoader,
ComponentFactoryResolver, ComponentRef, Injector, NgModuleFactory,
NgModuleRef,
Type
Type,
} from '@angular/core';
import { TestBed, fakeAsync, flushMicrotasks } from '@angular/core/testing';
import { ElementsLoader } from './elements-loader';
import { ELEMENT_MODULE_PATHS_TOKEN, WithCustomElementComponent } from './element-registry';
import { ELEMENT_MODULE_LOAD_CALLBACKS_TOKEN, WithCustomElementComponent } from './element-registry';
interface Deferred {
@ -17,20 +18,25 @@ interface Deferred {
describe('ElementsLoader', () => {
let elementsLoader: ElementsLoader;
let compiler: Compiler;
beforeEach(() => {
const injector = TestBed.configureTestingModule({
providers: [
ElementsLoader,
{ provide: NgModuleFactoryLoader, useClass: FakeModuleFactoryLoader },
{ provide: ELEMENT_MODULE_PATHS_TOKEN, useValue: new Map([
['element-a-selector', 'element-a-module-path'],
['element-b-selector', 'element-b-module-path']
{
provide: ELEMENT_MODULE_LOAD_CALLBACKS_TOKEN, useValue: new Map<
string, () => Promise<NgModuleFactory<WithCustomElementComponent> | Type<WithCustomElementComponent>>
>([
['element-a-selector', () => Promise.resolve(new FakeModuleFactory('element-a-module'))],
['element-b-selector', () => Promise.resolve(new FakeModuleFactory('element-b-module'))],
['element-c-selector', () => Promise.resolve(FakeCustomElementModule)]
])},
]
});
elementsLoader = injector.get(ElementsLoader);
compiler = injector.get(Compiler);
});
describe('loadContainedCustomElements()', () => {
@ -148,7 +154,7 @@ describe('ElementsLoader', () => {
// Verify the right component was loaded/registered.
const Ctor = definedSpy.calls.argsFor(0)[1];
expect(Ctor.observedAttributes).toEqual(['element-a-module-path']);
expect(Ctor.observedAttributes).toEqual(['element-a-module']);
}));
it('should wait until the element is defined', fakeAsync(() => {
@ -222,6 +228,20 @@ describe('ElementsLoader', () => {
expect(definedSpy).toHaveBeenCalledTimes(1);
})
);
it('should be able to load and register an element after compiling its NgModule', fakeAsync(() => {
const compilerSpy = spyOn(compiler, 'compileModuleAsync')
.and.returnValue(Promise.resolve(new FakeModuleFactory('element-c-module')));
elementsLoader.loadCustomElement('element-c-selector');
flushMicrotasks();
expect(definedSpy).toHaveBeenCalledTimes(1);
expect(definedSpy).toHaveBeenCalledWith('element-c-selector', jasmine.any(Function));
expect(compilerSpy).toHaveBeenCalledTimes(1);
expect(compilerSpy).toHaveBeenCalledWith(FakeCustomElementModule);
}));
});
});
@ -282,13 +302,6 @@ class FakeModuleFactory extends NgModuleFactory<any> {
}
}
class FakeModuleFactoryLoader extends NgModuleFactoryLoader {
load(modulePath: string): Promise<NgModuleFactory<any>> {
const fakeModuleFactory = new FakeModuleFactory(modulePath);
return Promise.resolve(fakeModuleFactory);
}
}
function returnPromisesFromSpy(spy: jasmine.Spy): Deferred[] {
const deferreds: Deferred[] = [];
spy.and.callFake(() => new Promise((resolve, reject) => deferreds.push({resolve, reject})));

View File

@ -1,24 +1,27 @@
import {
Compiler,
Inject,
Injectable,
NgModuleFactoryLoader,
NgModuleFactory,
NgModuleRef,
Type,
} from '@angular/core';
import { ELEMENT_MODULE_PATHS_TOKEN } from './element-registry';
import { ELEMENT_MODULE_LOAD_CALLBACKS_TOKEN, WithCustomElementComponent } from './element-registry';
import { from, Observable, of } from 'rxjs';
import { createCustomElement } from '@angular/elements';
import { LoadChildrenCallback } from '@angular/router';
@Injectable()
export class ElementsLoader {
/** Map of unregistered custom elements and their respective module paths to load. */
private elementsToLoad: Map<string, string>;
private elementsToLoad: Map<string, LoadChildrenCallback>;
/** Map of custom elements that are in the process of being loaded and registered. */
private elementsLoading = new Map<string, Promise<void>>();
constructor(private moduleFactoryLoader: NgModuleFactoryLoader,
private moduleRef: NgModuleRef<any>,
@Inject(ELEMENT_MODULE_PATHS_TOKEN) elementModulePaths: Map<string, string>) {
constructor(private moduleRef: NgModuleRef<any>,
@Inject(ELEMENT_MODULE_LOAD_CALLBACKS_TOKEN) elementModulePaths: Map<string, LoadChildrenCallback>,
private compiler: Compiler) {
this.elementsToLoad = new Map(elementModulePaths);
}
@ -47,9 +50,23 @@ export class ElementsLoader {
if (this.elementsToLoad.has(selector)) {
// Load and register the custom element (for the first time).
const modulePath = this.elementsToLoad.get(selector)!;
const loadedAndRegistered = this.moduleFactoryLoader
.load(modulePath)
const modulePathLoader = this.elementsToLoad.get(selector)!;
const loadedAndRegistered =
(modulePathLoader() as Promise<NgModuleFactory<WithCustomElementComponent> | Type<WithCustomElementComponent>>)
.then(elementModuleOrFactory => {
/**
* With View Engine, the NgModule factory is created and provided when loaded.
* With Ivy, only the NgModule class is provided loaded and must be compiled.
* This uses the same mechanism as the deprecated `SystemJsNgModuleLoader` in
* in `packages/core/src/linker/system_js_ng_module_factory_loader.ts`
* to pass on the NgModuleFactory, or compile the NgModule and return its NgModuleFactory.
*/
if (elementModuleOrFactory instanceof NgModuleFactory) {
return elementModuleOrFactory;
} else {
return this.compiler.compileModuleAsync(elementModuleOrFactory);
}
})
.then(elementModuleFactory => {
const elementModuleRef = elementModuleFactory.create(this.moduleRef.injector);
const injector = elementModuleRef.injector;

View File

@ -7,6 +7,10 @@ body {
-moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 {
color: $deepgray;
}
h1 {
display: inline-block;
font-size: 24px;
@ -54,7 +58,11 @@ h6 {
clear: both;
}
h2, h3, h4, h5, h6 {
h2,
h3,
h4,
h5,
h6 {
a {
font-size: inherit;
}
@ -68,13 +76,20 @@ h2, h3, h4, h5, h6 {
margin-top: 0;
}
p, ol, ul, ol, li, input, a {
p,
ol,
ul,
ol,
li,
input,
a {
font-size: 14px;
line-height: 24px;
letter-spacing: 0.30px;
letter-spacing: 0.3px;
font-weight: 400;
color: $darkgray;
& > em {
letter-spacing: 0.30px;
letter-spacing: 0.3px;
}
}
@ -87,13 +102,26 @@ p + ul {
}
ol {
li, p {
li,
p {
margin: 4px 0;
}
}
li p {
margin: 0;
ol ol {
list-style-type: lower-alpha;
ol {
list-style-type: lower-roman;
}
}
li {
padding-bottom: 8px;
p {
margin: 0;
}
}
a {
@ -103,7 +131,7 @@ a {
.app-toolbar a {
font-size: 16px;
font-weight: 400;
color: white;
color: $white;
font-family: $main-font;
text-transform: uppercase;
padding: 21px 0;
@ -129,9 +157,10 @@ table tbody th {
td {
font-weight: 400;
padding: 8px 30px;
letter-spacing: 0.30px;
letter-spacing: 0.3px;
> p, ul {
> p,
ul {
&:first-child {
margin-top: 0;
}

View File

@ -7,7 +7,7 @@ aio-shell.page-docs {
.sidenav-content {
min-height: 100vh;
padding: 80px 3rem 1rem;
padding: 80px 3rem 2rem;
}
@media (max-width: 600px) {

View File

@ -5,12 +5,15 @@ footer {
padding: 48px;
z-index: 0;
background-color: $blue;
color: $offwhite;
font-weight: 300;
aio-footer {
position: relative;
z-index: 0;
& > * {
color: $white;
}
}
.footer-block {
@ -19,8 +22,7 @@ footer {
}
a {
color: $offwhite;
font-weight: 300;
color: $white;
text-decoration: none;
z-index: 20;
position: relative;
@ -39,6 +41,7 @@ footer {
text-transform: uppercase;
font-weight: 400;
margin: 0 0 16px;
color: $white;
}
p {
text-align: center;

View File

@ -2,8 +2,9 @@ html, body {
height: 100%;
}
body {
background-color: $offwhite;
body,
.content {
background-color: $white;
}
.clearfix {
@ -48,4 +49,4 @@ body {
.text-uppercase {
text-transform: uppercase;
}
}

View File

@ -42,7 +42,7 @@ section#intro {
height: 480px;
margin: 0 auto -32px;
padding: 48px 0 0;
color: white;
color: $white;
@media (max-width: 780px) {
flex-direction: column;
@ -426,7 +426,7 @@ div[layout=row]{
text-transform: uppercase;
font-size: 24px;
font-weight: 300;
color: white;
color: $white;
margin: 0;
-webkit-margin-before: 0;
-webkit-margin-after: 0;

View File

@ -28,7 +28,7 @@ mat-sidenav.mat-sidenav.sidenav {
left: 0;
padding: 0;
min-width: 260px;
background-color: $offwhite;
background-color: $white;
box-shadow: 6px 0 6px rgba(0,0,0,0.10);
&.collapsed {
@ -48,6 +48,11 @@ mat-sidenav-container.sidenav-container {
}
}
mat-sidenav-container.sidenav-container.mat-drawer-container.mat-sidenav-container,
mat-sidenav-container .sidenav-content {
background-color: $white;
}
mat-sidenav-container div.mat-sidenav-content {
height: auto;
}

View File

@ -180,7 +180,7 @@ aio-search-box.search-container {
color: $darkgray;
border: none;
border-radius: 100px;
background-color: $offwhite;
background-color: $white;
padding: 5px 16px;
margin-left: 8px;
width: 180px;

View File

@ -94,7 +94,7 @@ a.filter-button {
&:hover {
background-color: $blue;
color: white;
color: $white;
}
}

View File

@ -20,6 +20,10 @@
font-size: 14px;
}
> *:not(:first-child) {
padding: 16px 24px;
}
&.is-critical {
border-color: $brightred;
background: rgba($brightred, 0.05);

View File

@ -35,7 +35,7 @@
section {
color: $darkgray;
color: $deepgray;
font-size: 20px;
line-height: 24px;
margin: 0;

View File

@ -5,7 +5,6 @@ code-example, code-tabs {
code-example {
&:not(.no-box) {
background-color: rgba($backgroundgray, 0.2);
border: 0.5px solid $lightgray;
@ -38,6 +37,10 @@ code-example, code-tabs {
}
}
code-tabs {
margin: 16px 0;
}
// TERMINAL / SHELL TEXT STYLES
code-example.code-shell, code-example[language=sh], code-example[language=bash] {
@ -151,6 +154,7 @@ ol.linenums {
margin: 0;
font-family: $main-font;
color: #B3B6B7;
li {
margin: 0;
font-family: $code-font;

View File

@ -22,7 +22,7 @@ aio-contributor-list {
a {
&.selected {
background-color: $blue;
color: white;
color: $white;
}
}
}
@ -188,7 +188,7 @@ aio-contributor {
line-height: 18px;
margin: 8px 16px;
text-overflow: ellipsis;
overflow: scroll;
overflow-y: auto;
font-weight: 400;
}
}

View File

@ -1,5 +1,5 @@
.filetree {
background: $offwhite;
background: $white;
border: 4px solid $lightgray;
border-radius: 4px;
margin: 0 0 24px 0;
@ -35,4 +35,4 @@
}
}
}
}
}

View File

@ -32,15 +32,30 @@
}
figure {
border-radius: 4px;
margin: 0;
margin-top: 14px;
margin-bottom: 14px;
border-radius: 1px;
background: $white;
padding: 20px;
border: 1px solid $lightgray;
padding: 32px;
box-sizing: border-box;
display: inline-block;
box-shadow: 2px 2px 5px 0 rgba(0, 0, 0, .2);
margin: 0 0 14px 0;
margin: 16px 0;
img {
&.lightbox {
background-color: $lightboxgray;
width: 100%;
display: flex;
justify-content: center;
}
div.card {
box-shadow: 0 2px 2px rgba(10, 16, 20, 0.24), 0 0 2px rgba(10, 16, 20, 0.12);
border-radius: 4px;
padding: 8px;
background-color: $white;
}
}
}

View File

@ -3,7 +3,7 @@ label.raised, .api-header label {
padding: 4px 16px;
display: inline;
font-size: 14px;
color: white;
color: $white;
margin-right: 8px;
font-weight: 500;
text-transform: uppercase;
@ -64,4 +64,4 @@ label.raised, .api-header label {
}
}
}
}

View File

@ -2,7 +2,7 @@ table {
margin: 24px 0px;
box-shadow: 0 2px 2px rgba($black, 0.24), 0 0 2px rgba($black, 0.12);
border-radius: 2px;
background: $offwhite;
background: $white;
&.is-full-width {
width: 100%;

View File

@ -18,9 +18,11 @@ $white: #FFFFFF;
$offwhite: #FAFAFA;
$backgroundgray: #F1F1F1;
$lightgray: #DBDBDB;
$lightboxgray: #EBEBEB;
$mist: #ECEFF1;
$mediumgray: #6e6e6e;
$darkgray: #333;
$mediumgray: #6E6E6E;
$darkgray: #444444;
$deepgray: #333333;
$black: #0A1014;
$orange: #FF9800;
$darkorange: #940;
@ -119,4 +121,4 @@ $api-symbols: (
// OTHER
$small-breakpoint-width: 840px;
$phone-breakpoint: 480px;
$tablet-breakpoint: 800px;
$tablet-breakpoint: 800px;

View File

@ -12,14 +12,14 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^8.0.0-rc",
"@angular/common": "^8.0.0-rc",
"@angular/compiler": "^8.0.0-rc",
"@angular/core": "^8.0.0-rc",
"@angular/forms": "^8.0.0-rc",
"@angular/platform-browser": "^8.0.0-rc",
"@angular/platform-browser-dynamic": "^8.0.0-rc",
"@angular/router": "^8.0.0-rc",
"@angular/animations": "^8.0.0",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/forms": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"angular-in-memory-web-api": "^0.8.0",
"core-js": "^2.5.4",
"rxjs": "^6.5.1",
@ -28,10 +28,10 @@
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.800.0-rc",
"@angular/cli": "^8.0.0-rc",
"@angular/compiler-cli": "^8.0.0-rc",
"@angular/language-service": "^8.0.0-rc",
"@angular-devkit/build-angular": "^0.800.0",
"@angular/cli": "^8.0.0",
"@angular/compiler-cli": "^8.0.0",
"@angular/language-service": "^8.0.0",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",

View File

@ -13,7 +13,7 @@ body {
margin: 2em;
}
body, input[text], button {
color: #888;
color: #333;
font-family: Cambria, Georgia;
}
a {

View File

@ -15,14 +15,14 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^8.0.0-rc",
"@angular/common": "^8.0.0-rc",
"@angular/compiler": "^8.0.0-rc",
"@angular/core": "^8.0.0-rc",
"@angular/forms": "^8.0.0-rc",
"@angular/platform-browser": "^8.0.0-rc",
"@angular/platform-browser-dynamic": "^8.0.0-rc",
"@angular/router": "^8.0.0-rc",
"@angular/animations": "^8.0.0",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/forms": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"angular-in-memory-web-api": "^0.8.0",
"core-js": "^2.5.4",
"rxjs": "^6.5.1",
@ -30,10 +30,10 @@
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.800.0-rc",
"@angular/cli": "^8.0.0-rc",
"@angular/compiler-cli": "^8.0.0-rc",
"@angular/language-service": "^8.0.0-rc",
"@angular-devkit/build-angular": "^0.800.0",
"@angular/cli": "^8.0.0",
"@angular/compiler-cli": "^8.0.0",
"@angular/language-service": "^8.0.0",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",

View File

@ -12,15 +12,15 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^8.0.0-rc",
"@angular/common": "^8.0.0-rc",
"@angular/compiler": "^8.0.0-rc",
"@angular/core": "^8.0.0-rc",
"@angular/forms": "^8.0.0-rc",
"@angular/platform-browser": "^8.0.0-rc",
"@angular/platform-browser-dynamic": "^8.0.0-rc",
"@angular/router": "^8.0.0-rc",
"@angular/service-worker": "^8.0.0-rc",
"@angular/animations": "^8.0.0",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/forms": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"@angular/service-worker": "^8.0.0",
"angular-in-memory-web-api": "^0.8.0",
"core-js": "^2.5.4",
"rxjs": "^6.5.1",
@ -28,10 +28,10 @@
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.800.0-rc",
"@angular/cli": "^8.0.0-rc",
"@angular/compiler-cli": "^8.0.0-rc",
"@angular/language-service": "^8.0.0-rc",
"@angular-devkit/build-angular": "^0.800.0",
"@angular/cli": "^8.0.0",
"@angular/compiler-cli": "^8.0.0",
"@angular/language-service": "^8.0.0",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",

View File

@ -16,18 +16,17 @@
},
"private": true,
"dependencies": {
"@angular/animations": "^8.0.0-rc",
"@angular/common": "^8.0.0-rc",
"@angular/compiler": "^8.0.0-rc",
"@angular/core": "^8.0.0-rc",
"@angular/forms": "^8.0.0-rc",
"@angular/http": "^8.0.0-rc",
"@angular/platform-browser": "^8.0.0-rc",
"@angular/platform-browser-dynamic": "^8.0.0-rc",
"@angular/router": "^8.0.0-rc",
"@nguniversal/common": "^8.0.0-rc",
"@nguniversal/express-engine": "^8.0.0-rc",
"@nguniversal/module-map-ngfactory-loader": "^8.0.0-rc",
"@angular/animations": "^8.0.0",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/forms": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"@nguniversal/common": "^8.0.0-rc.1",
"@nguniversal/express-engine": "^8.0.0-rc.1",
"@nguniversal/module-map-ngfactory-loader": "^8.0.0-rc.1",
"angular-in-memory-web-api": "^0.8.0",
"core-js": "^2.5.4",
"rxjs": "^6.5.1",
@ -35,11 +34,11 @@
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.800.0-rc",
"@angular/cli": "^8.0.0-rc",
"@angular/compiler-cli": "^8.0.0-rc",
"@angular/language-service": "^8.0.0-rc",
"@angular/platform-server": "^8.0.0-rc",
"@angular-devkit/build-angular": "^0.800.0",
"@angular/cli": "^8.0.0",
"@angular/compiler-cli": "^8.0.0",
"@angular/language-service": "^8.0.0",
"@angular/platform-server": "^8.0.0",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",

View File

@ -18,20 +18,20 @@
"author": "",
"license": "MIT",
"dependencies": {
"@angular/animations": "8.0.0-rc.2",
"@angular/common": "8.0.0-rc.2",
"@angular/compiler": "8.0.0-rc.2",
"@angular/core": "8.0.0-rc.2",
"@angular/elements": "8.0.0-rc.2",
"@angular/forms": "8.0.0-rc.2",
"@angular/platform-browser": "8.0.0-rc.2",
"@angular/platform-browser-dynamic": "8.0.0-rc.2",
"@angular/router": "8.0.0-rc.2",
"@angular/service-worker": "8.0.0-rc.2",
"@angular/upgrade": "8.0.0-rc.2",
"@nguniversal/common": "8.0.0-rc.0",
"@nguniversal/express-engine": "8.0.0-rc.0",
"@nguniversal/module-map-ngfactory-loader": "^8.0.0-rc.0",
"@angular/animations": "^8.0.0",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/elements": "^8.0.0",
"@angular/forms": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"@angular/service-worker": "^8.0.0",
"@angular/upgrade": "^8.0.0",
"@nguniversal/common": "^8.0.0-rc.1",
"@nguniversal/express-engine": "^8.0.0-rc.1",
"@nguniversal/module-map-ngfactory-loader": "^8.0.0-rc.1",
"angular-in-memory-web-api": "github:brandonroberts/in-memory-web-api-bazel#50a34d8",
"core-js": "^2.5.4",
"express": "^4.14.1",
@ -42,11 +42,11 @@
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "0.800.0-rc.3",
"@angular/cli": "8.0.0-rc.3",
"@angular/compiler-cli": "8.0.0-rc.2",
"@angular/language-service": "8.0.0-rc.2",
"@angular/platform-server": "8.0.0-rc.2",
"@angular-devkit/build-angular": "0.800.0",
"@angular/cli": "^8.0.0",
"@angular/compiler-cli": "^8.0.0",
"@angular/language-service": "^8.0.0",
"@angular/platform-server": "^8.0.0",
"@types/angular": "^1.6.47",
"@types/angular-animate": "^1.5.10",
"@types/angular-mocks": "^1.6.0",

View File

@ -2,24 +2,24 @@
# yarn lockfile v1
"@angular-devkit/architect@0.800.0-rc.3":
version "0.800.0-rc.3"
resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.800.0-rc.3.tgz#71043979d63bbf45d5b1cfd3d0d6feaee6399388"
integrity sha512-nX3sIDj7J3y5R6Hzsf052tfs5Fx+QE3KBv7u1prfaqVX9i5EnBJZeHAbwmBFPLUlhgrqp0azwwD4L2RHpPuicA==
"@angular-devkit/architect@0.800.0":
version "0.800.0"
resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.800.0.tgz#2f2ce1178b12b0c0fde455d00def60104b9cd08e"
integrity sha512-haXTS9EDaJfKyYiFylK2hObJH5DVGhX3OEn3OC7XUVlfKV3GRmC6NKXPjnxcN0wWP5zIV1c4xuB2N64mcxSnaA==
dependencies:
"@angular-devkit/core" "8.0.0-rc.3"
"@angular-devkit/core" "8.0.0"
rxjs "6.4.0"
"@angular-devkit/build-angular@0.800.0-rc.3":
version "0.800.0-rc.3"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.800.0-rc.3.tgz#e71b2362d66d5dbd6f13766481abbb1b160939f0"
integrity sha512-MlKd3nMYixXgH7DgS+eO2zBzOA/GHSuEslycH2aAmLmTRYpnLaICTMenJWB2WRkndhaYlY7SEDV2nY4jQPal0g==
"@angular-devkit/build-angular@0.800.0":
version "0.800.0"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.800.0.tgz#6be1a0268daeadc7f07a73f1a1ec2759e4a0965b"
integrity sha512-JO9oT1VMhjuXF+OwLMBTMdRrS0jC2zIThO9UZYpE8oTtkL+17ra+5SN/fFg+2L7rx4kLUWDzcZGaVp9yTptXxw==
dependencies:
"@angular-devkit/architect" "0.800.0-rc.3"
"@angular-devkit/build-optimizer" "0.800.0-rc.3"
"@angular-devkit/build-webpack" "0.800.0-rc.3"
"@angular-devkit/core" "8.0.0-rc.3"
"@ngtools/webpack" "8.0.0-rc.3"
"@angular-devkit/architect" "0.800.0"
"@angular-devkit/build-optimizer" "0.800.0"
"@angular-devkit/build-webpack" "0.800.0"
"@angular-devkit/core" "8.0.0"
"@ngtools/webpack" "8.0.0"
ajv "6.10.0"
autoprefixer "9.5.1"
browserslist "4.5.5"
@ -65,30 +65,30 @@
webpack-subresource-integrity "1.1.0-rc.6"
worker-plugin "3.1.0"
"@angular-devkit/build-optimizer@0.800.0-rc.3":
version "0.800.0-rc.3"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.800.0-rc.3.tgz#d320cea2c07f373dd618f75d0dd60a29e5d5f578"
integrity sha512-pCKssuGq/YX6AyG8od8t781PbpQhJl3bH8trKYRuTkfNnrErN13Ebl1WMngu0cs4BnVsreUnI6x9ZZv8YxD4Ng==
"@angular-devkit/build-optimizer@0.800.0":
version "0.800.0"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.800.0.tgz#c2c8d5966801e243bf25d47b704b5b4de7cbdb3f"
integrity sha512-Cex/BynswHw+pvhiAwHlW51PFerGoa6J+wR93Te/4yIiCrX6KzWy6/v0RO5eY+iuebAr5QZDezcofB0Eg5yjiA==
dependencies:
loader-utils "1.2.3"
source-map "0.5.6"
typescript "3.4.4"
webpack-sources "1.3.0"
"@angular-devkit/build-webpack@0.800.0-rc.3":
version "0.800.0-rc.3"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.800.0-rc.3.tgz#b35eb5ba98f7744737be884e1e38d4e707bb9dc7"
integrity sha512-h4gCBu6wENyetAxHCGT09UGXUTM+4doWLAo7n/MjEylZEfOX82xo6ylQUPzCEEiSJ6wHd+Zvcsl98ftbRPa7KA==
"@angular-devkit/build-webpack@0.800.0":
version "0.800.0"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.800.0.tgz#304702b5cfcd6f4e4a578e9b9daccd8d9085eb2a"
integrity sha512-7lPbO1u6MMqU9G7kKWiELdFDqQGLuuiK6muqmO+nct8o1m5XpJ33HHfkxpF+nrt1qjKE1ZVCerAu0fNeaTyK0g==
dependencies:
"@angular-devkit/architect" "0.800.0-rc.3"
"@angular-devkit/core" "8.0.0-rc.3"
"@angular-devkit/architect" "0.800.0"
"@angular-devkit/core" "8.0.0"
rxjs "6.4.0"
webpack-merge "4.2.1"
"@angular-devkit/core@8.0.0-rc.3":
version "8.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-8.0.0-rc.3.tgz#a5e10e941d8a046abda9046e816d45694703c695"
integrity sha512-5PmX42/XOzPSqhIZBtXyozBN01Qpagj3YO0+ToKPDY+veGEUonPhz1jBiJ639NBldlGW1BBdQczpGZNg3uJj9A==
"@angular-devkit/core@8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-8.0.0.tgz#a0ca65d8d0f928db9288316b1f3346d21f722213"
integrity sha512-wYf4zzpYj5Y673DG8iteK0GsDDuXBKN/TOXm4lUwmXcz8QHTD+BfR6qA5TBDqlMGpU7CP1/0vgbv2px17CDETQ==
dependencies:
ajv "6.10.0"
fast-json-stable-stringify "2.0.0"
@ -96,31 +96,31 @@
rxjs "6.4.0"
source-map "0.7.3"
"@angular-devkit/schematics@8.0.0-rc.3":
version "8.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-8.0.0-rc.3.tgz#754db2735863393066a7dd88915b5b594ccde4b8"
integrity sha512-u08GNDCRbm4fYYilmnT27Pp6QW/FxD7W9bpUH8Kp4i6r0f4uBuYQiQT1x6celTwj8Bh1fQqCq/kM/lAG0dd5Zg==
"@angular-devkit/schematics@8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-8.0.0.tgz#53d14646c6286b0397417990fc83e3e9a6ecf233"
integrity sha512-IXJOs/DkDqNbfG76sNNY5ePZ37rjkMUopmtvhN6/U1hQFwTpGa9N0bCHFphcKraXeS6Jfox5XwFEStc/1xyhfw==
dependencies:
"@angular-devkit/core" "8.0.0-rc.3"
"@angular-devkit/core" "8.0.0"
rxjs "6.4.0"
"@angular/animations@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-8.0.0-rc.2.tgz#aef2683aba35498fe26253bf8f461a1658864e49"
integrity sha512-XTT7Eif6Km6MSbLr6qlCmx8vjRgx/Hp5Hv1WnnPtRFt8XeidYGGYIq2si3CxQ2xBjEO3OpNbPqtYvZKH1yuBdA==
"@angular/animations@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-8.0.0.tgz#6286094babdb3879f7aefcd73aa31772469e50b4"
integrity sha512-hggSRi83rmocLwzrKZtmFcqPdivKSJqp2yiYaiNmJ2yQWJ1JW/Lurypv9H347RWxmwCCwC2kV8embTGbOXIFDQ==
dependencies:
tslib "^1.9.0"
"@angular/cli@8.0.0-rc.3":
version "8.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-8.0.0-rc.3.tgz#88f030c3ed682717ea318210f4460e9fdc4a9799"
integrity sha512-yY72F9wnsvrtgSkmNA1KIyx6eTRUkLaOcpyfzSPNiIHxWCy8pZvA6TbY49bBNFUatV677RuyMS0XVjww0viVxw==
"@angular/cli@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-8.0.0.tgz#0f65f60e8714b7b99f9425b862221e818959b0ac"
integrity sha512-F7zdAazejA94WKXULLWs0cj76/LkGx2Jb+yGE7QWx3jkp5j18KI3jTU+h9UOtxk0zgV4oSy9AQpJQVZFPZPQFA==
dependencies:
"@angular-devkit/architect" "0.800.0-rc.3"
"@angular-devkit/core" "8.0.0-rc.3"
"@angular-devkit/schematics" "8.0.0-rc.3"
"@schematics/angular" "8.0.0-rc.3"
"@schematics/update" "0.800.0-rc.3"
"@angular-devkit/architect" "0.800.0"
"@angular-devkit/core" "8.0.0"
"@angular-devkit/schematics" "8.0.0"
"@schematics/angular" "8.0.0"
"@schematics/update" "0.800.0"
"@yarnpkg/lockfile" "1.1.0"
debug "^4.1.1"
ini "1.3.5"
@ -128,22 +128,23 @@
npm-package-arg "6.1.0"
open "6.2.0"
pacote "9.5.0"
read-package-tree "5.2.2"
semver "6.0.0"
symbol-observable "1.2.0"
universal-analytics "^0.4.20"
uuid "^3.3.2"
"@angular/common@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/common/-/common-8.0.0-rc.2.tgz#77b2da22cb11bf2039799d56ec2fb7c4f51a1374"
integrity sha512-/MUZhebMAkAwV8jkimBONN2eOQ2/5qO54ZvPypyy2tEHk69JRNLFjREaR+VU8yGlS/1MU6jTYxyfRW2c8ggLzA==
"@angular/common@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/common/-/common-8.0.0.tgz#700aeda9be8af96692fce0ea6bf6157f7c874c0e"
integrity sha512-iOAJZ0+1zTRHnHE/5G30+4Q66W1pfZkSkxZIXvgijZ+wtuNloYdWNy/IdZ/m7ayBI7A6FsYEhyMUoWz2HVEJNw==
dependencies:
tslib "^1.9.0"
"@angular/compiler-cli@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-8.0.0-rc.2.tgz#a3ef74f3e4ea448ccf1387c18c32fc664b67b2e1"
integrity sha512-lLhedaTQ08/i4aysCPpTYbAP0/8T5/EHE79FByp/7XxqRuQxcXkFJujQT1Q/KReKa0gA9JEYD4I1eBJpNYyMLQ==
"@angular/compiler-cli@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-8.0.0.tgz#b53ebb5accc34a68bf7a63d16130ca7c568f8a51"
integrity sha512-Z0U0Ih8A7V3J1gq7AXnXbrGAD2ERmz7JbREJJRHDWiUNxIqGQiV3Odo1V8FL5n/cKvLwSYM2Ubvk10gb0+3njA==
dependencies:
canonical-path "1.0.0"
chokidar "^2.1.1"
@ -157,80 +158,80 @@
tslib "^1.9.0"
yargs "13.1.0"
"@angular/compiler@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-8.0.0-rc.2.tgz#8395c20d2d7e93c6941a45b039e03ae7a6277797"
integrity sha512-/NR0EN6wjit2mfgOhWirOjKp+s7lO1QSKhzK3TjYCda1L7Pijo29s3BGMWUSPCRno8zNH5o7Q0mWCC55MBGB4w==
"@angular/compiler@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-8.0.0.tgz#302c987737e1473db3a113ff70fbbb315aa41b58"
integrity sha512-4rKsVFMNykF83tPL1VE1+j9kZ3cWHUsLOAB/VqmF64EcR/GsbjKog2v23rSso5kqUtPiVq/FWGYllW6qMdxtJA==
dependencies:
tslib "^1.9.0"
"@angular/core@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/core/-/core-8.0.0-rc.2.tgz#800fd49bbc176f7ee064375b726503c5e6c8387c"
integrity sha512-ImXzoQk8U3IiL75dJWnO/aIGfaExgiqDc6GJYgQ8PvB7ZUkdUOj/a+jd6asMvE52VZJkof5XShhdonTScPcdUA==
"@angular/core@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/core/-/core-8.0.0.tgz#bf7a582b818e9181d830219907470e2b865ba32f"
integrity sha512-mrkP1PTzqCmZGLYll+TDyawLXHzi+FcRPqSuRxCmDMthUUE93SLXT2yISDkx9aMPtFKgFr6KfrIkKuCz16BP/g==
dependencies:
tslib "^1.9.0"
"@angular/elements@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/elements/-/elements-8.0.0-rc.2.tgz#84ca2aadff66bfcd3c8042492a0c6b87a6a749fa"
integrity sha512-7KVPDSGXo33WD+ZQHjmvSXyBa6az6MHIQo3I+wRKUB9pBZNqMa2Dcb7FQp7fq3tQTEpOW6fO52ozxAZ/ybozxA==
"@angular/elements@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/elements/-/elements-8.0.0.tgz#7d25f95ba6854adb7361f106701cb1280394867f"
integrity sha512-vDs/O/9RNpmXaGJjmtFZ6MNFr2rqfB2qgq8tDcYkY7bAF11ulfwI2OXsI2vFnf4/qBlstdwXTmI5zar+ZU6MGA==
dependencies:
tslib "^1.9.0"
"@angular/forms@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-8.0.0-rc.2.tgz#f4db4653470b74cd55508aa83da761309a1d341d"
integrity sha512-rjjGNVaxwOayuZCpsG8V13RK/h7S6v5ItzG6Ai1agO/em4/riNhEP3+BvxM4Rs1v4AfGOd+LhOeLt5qptj0JKA==
"@angular/forms@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-8.0.0.tgz#6d636c4f83004290e1a5732a05e87148aaf6ed64"
integrity sha512-T6XdG3mALWzvnrN3fA1hAmfwvraiF1SPMWNXgPk2riuMf8CFdoro+tQZ4eo1islHrTTw5QzmqN8JJALfhAG6bg==
dependencies:
tslib "^1.9.0"
"@angular/language-service@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-8.0.0-rc.2.tgz#5b8fd13b7cd9e7cc1c097f92749f05e72b1c7e47"
integrity sha512-PXsntGd053iiM9lJPo7jmjhd5dp6AxugEC4WDTXimZ3vK2Hzv53CnKuVTUGcTWjwazbKAEyG0jiUl4VXptwTAA==
"@angular/language-service@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-8.0.0.tgz#1ee4ce5003897cad53597da28f4c94fe30519bfb"
integrity sha512-vGk14oWroEo6ycO4cooznx57nn2sASmCQ/sdE8UVwySUKl940TsVzijgaGqapTepFof9sMqN77y2G15eRKQeAQ==
"@angular/platform-browser-dynamic@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.0.0-rc.2.tgz#86e8e227f19aa9c6ef4439623ce6cf7f2b0cd3b1"
integrity sha512-c4QXgAikQx25AOnNiQUOe/yNJunR95rfTJ5yApcNU76eeCMG9KLFNGGQTg+PmcxZ6UMcw9zp2Tck9vjSb2BZYg==
"@angular/platform-browser-dynamic@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.0.0.tgz#c15f394579ff44f3752033de58edc1afa5065d59"
integrity sha512-dx7W7JoSFbsveexjZ/BPlsXbMDLWVLmRCo7IqLvibMrTbdpaaOCNJIXJk1X+f7JJrQ7SwlZaVkoLCMoDWw6fmA==
dependencies:
tslib "^1.9.0"
"@angular/platform-browser@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-8.0.0-rc.2.tgz#b40fa05fd32422be499ab3986bc3031374f7c5bc"
integrity sha512-ErzIDckIqic9rmqMFk4scRX+lo7AWifOP+IOCot1KGPdQ7+CP/h/neJ9fiIzYTSDYUm5xk5i+2aW+2SWRJYQdA==
"@angular/platform-browser@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-8.0.0.tgz#fc7c55a0483e67e5606e499c129fda60ae8d4363"
integrity sha512-fTD+pTMbq+On9Uv3VXiei2lfuX7GX31dngm/Y4yWTFeW6eXy0+7kkfflzpLOb0hykCZvcXzarqCuEBBYNLrrOg==
dependencies:
tslib "^1.9.0"
"@angular/platform-server@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-8.0.0-rc.2.tgz#3f583f4e4fd393218b9e14ab68b179279e9aa86d"
integrity sha512-5MVHNrazIw/WJ7ODah8kUY3AwXvw2HGscUUCW+sfkzJ7QqkWet7B1EExVEp708g/kooqyl92hjbFzTScXv4OCA==
"@angular/platform-server@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-8.0.0.tgz#87e80acba6b09955046dc0a9da7cd6b2e005061a"
integrity sha512-pA6m1okOfyy2qH5A6jUxrhx6z7eAG+ne7IM+j/6JUBDjp4KO9BC84aa/xfpZq5dsskl8E8II9c4hUKocMyeRjA==
dependencies:
domino "^2.1.2"
tslib "^1.9.0"
xhr2 "^0.1.4"
"@angular/router@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/router/-/router-8.0.0-rc.2.tgz#e0e4636f56fc08760863486f45f203bb9b00543e"
integrity sha512-7NnRdEykm0FJf/SHjUWz3cgGDtW5KM2gKm8it8V8azr3vIiMRYyqhDqCKkhutjt7C+yKNotB5M7Da9uYf0n/xQ==
"@angular/router@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/router/-/router-8.0.0.tgz#26094fd473e17441b0ae8af4883ec1b4ea3ad569"
integrity sha512-DGUTb8qpndE5m716xh00GxuC8o7qamlqbUruGB+SQD6ynU7s5yLGxtKffxqb1BT63+YewpsVxc2Koruvb1qjDw==
dependencies:
tslib "^1.9.0"
"@angular/service-worker@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-8.0.0-rc.2.tgz#e73374fe4ccd8c15790f007832a5e60576ed85d9"
integrity sha512-uudl7+P9Xov9naoW7Ruv0rvvp+jYWe3P3OOpRul8X6tTYarKnorj3F44Y5GoNO5Xxjp0psPSD558rXrrIBt98w==
"@angular/service-worker@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-8.0.0.tgz#5cb55bc39b29e318f5d72c1223a966c088f18568"
integrity sha512-MrR6Xb0X0+qO+bbdGasg7+xEvH7rPhgLpDn9FF/RwMMzj4qQmeJw9uRSJe9xMR6n0gNS7+cH8RptivOanY1QjQ==
dependencies:
tslib "^1.9.0"
"@angular/upgrade@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/upgrade/-/upgrade-8.0.0-rc.2.tgz#b95187a355afc3814bcb7d23d1af428047745850"
integrity sha512-I89l3PlrCRDDJyETbDs3BkUuLcjcLsITp4zI0SnriyYPHqKxaaC2QjCpJ/CYdk8LAuiQBIv9M/tK3o6Ow1d9qQ==
"@angular/upgrade@^8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/upgrade/-/upgrade-8.0.0.tgz#7a756815c553350ba4cd64a0275ac6fc14286898"
integrity sha512-HRL99P13Mql3/kyrX/XUHqA8fdXC6QAmEnbcatAyCq6BGjJ047z1EFv/A6LHXXN5GFAgziyQbEqw3CnhjUeRVw==
dependencies:
tslib "^1.9.0"
@ -312,47 +313,47 @@
lodash "^4.17.10"
to-fast-properties "^2.0.0"
"@ngtools/webpack@8.0.0-rc.3":
version "8.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-8.0.0-rc.3.tgz#9bbc52ecec8edf54e41f94935b9f4a05cb29d71c"
integrity sha512-XD2S0t1MhvXTJ3mksIgiSqFeUkXlWcN0hVQVjAxrUIthNI87asirYtcPryDDz+zmrhLM0f2HGJ8cU9bZgmyQ0Q==
"@ngtools/webpack@8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-8.0.0.tgz#1a842f14b80f5430358374d0150659cb029a0198"
integrity sha512-IbljboxtAde95VbxpmCLzVMA9SrPPCFsBsDu2bmCjRGRSjnMVbXNPFm3fel4AxjT+St650w8RLJ4h6Fb+AV/Aw==
dependencies:
"@angular-devkit/core" "8.0.0-rc.3"
"@angular-devkit/core" "8.0.0"
enhanced-resolve "4.1.0"
rxjs "6.4.0"
tree-kill "1.2.1"
webpack-sources "1.3.0"
"@nguniversal/common@8.0.0-rc.0":
version "8.0.0-rc.0"
resolved "https://registry.yarnpkg.com/@nguniversal/common/-/common-8.0.0-rc.0.tgz#92ea2dbe02a72c0c20b9be9172f4c329f0492ed4"
integrity sha512-i9DnPuQC2bixU1p7wBl1Cb9DJGy+o4YVMrunRWUqqwVXx/7TjMQDVQV4J9Cy1uUCJ1mQ2TkmM41BRAiBJbCojQ==
"@nguniversal/common@^8.0.0-rc.1":
version "8.0.0-rc.1"
resolved "https://registry.yarnpkg.com/@nguniversal/common/-/common-8.0.0-rc.1.tgz#21072437251765864d74add678b3a3540c4611aa"
integrity sha512-J/oNhuWFroB1JAWrXgRHFCdbYQ/XTWJxyUOi7pUaWfdF+kudjKFEVc2TARBmPSGEizHxkTIkysVHT817/L3lXQ==
"@nguniversal/express-engine@8.0.0-rc.0":
version "8.0.0-rc.0"
resolved "https://registry.yarnpkg.com/@nguniversal/express-engine/-/express-engine-8.0.0-rc.0.tgz#ecf86f8cb433e28a29af3cf6a01cc6b6dc00e32c"
integrity sha512-iSDeu5TwNw7KjQQu5N+UUa4ie04gpa0LpBFPkci9ZRGgaiRbwV4Z/qNmHe2MWI7o4k6xaZddDKC5ixGZ7Lo1Cw==
"@nguniversal/express-engine@^8.0.0-rc.1":
version "8.0.0-rc.1"
resolved "https://registry.yarnpkg.com/@nguniversal/express-engine/-/express-engine-8.0.0-rc.1.tgz#95f05b6fdac036f0deda7813e8ee08fa4b4edfd2"
integrity sha512-WGJZTxkCMgDHK3UQHi6h7AL9Us7Vroz+pAS60lKJ0oNUCxoJ9S+i4jXfb6rtR5DtOTBqUy8O8fQ0U0HZOhhoWA==
"@nguniversal/module-map-ngfactory-loader@^8.0.0-rc.0":
version "8.0.0-rc.0"
resolved "https://registry.yarnpkg.com/@nguniversal/module-map-ngfactory-loader/-/module-map-ngfactory-loader-8.0.0-rc.0.tgz#888d9c3ec5498acc4c6357eac7bcdcd436007558"
integrity sha512-Z9WbOr3XcNeLNeg7P3VBKVJN2yEM9zYlr+Nvdxhw28k1xJa0gH42G35jb9mETgbWVqOq0njT5++fouhdzEwaOQ==
"@nguniversal/module-map-ngfactory-loader@^8.0.0-rc.1":
version "8.0.0-rc.1"
resolved "https://registry.yarnpkg.com/@nguniversal/module-map-ngfactory-loader/-/module-map-ngfactory-loader-8.0.0-rc.1.tgz#ca82a170fe72057b2379a55147580803c951319e"
integrity sha512-dPac8uahg4XHSvrXP0/XkU/LaFhAHJ8N9h93ttXfrEXNMukarOmbyKzAuX9DVjcE6+lll1UCZtsEweRvQBZPbw==
"@schematics/angular@8.0.0-rc.3":
version "8.0.0-rc.3"
resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-8.0.0-rc.3.tgz#26f253e882173a78858e999409e64844b7030ddd"
integrity sha512-IuunKeNof7QL7aj3X56lS5KP28asmN18G9js2m/XTpyIKOX053kGppwWfBULmDnGMd4UR1+XU/xmIFQUq7vurQ==
"@schematics/angular@8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-8.0.0.tgz#47954888fb8acbc3600235db7a46229c47fe5d9c"
integrity sha512-c/cFpe+u7Xh4xX3/kn9BSRY4YhdO0OsDbRK0pGLDJFFs5JGvwoURtNXn4/4dVlsj3PWyNhxK0Ljl3dyw3NQBHA==
dependencies:
"@angular-devkit/core" "8.0.0-rc.3"
"@angular-devkit/schematics" "8.0.0-rc.3"
"@angular-devkit/core" "8.0.0"
"@angular-devkit/schematics" "8.0.0"
"@schematics/update@0.800.0-rc.3":
version "0.800.0-rc.3"
resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.800.0-rc.3.tgz#2cd33c21ed2ef82320f43ae3701945737f994e1a"
integrity sha512-H7beN0qLdqNX9WbgvBVwVN/WwXhmbBaZEDkclzMz8RivjBwX08ZA5HbDvwPU7oU5pYT2hpdaYpNuZFHxfz5EFg==
"@schematics/update@0.800.0":
version "0.800.0"
resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.800.0.tgz#dddf09764f1917a1f42fea61af2520b196cdbfd0"
integrity sha512-StheH+k4GCaHqmtDsHLSFmxu8SCDJVhZTXpz2zFAVaVXDh/ABS2Dt7I7SmEMGkUHcPA+u83sbZVBIacw2QfybQ==
dependencies:
"@angular-devkit/core" "8.0.0-rc.3"
"@angular-devkit/schematics" "8.0.0-rc.3"
"@angular-devkit/core" "8.0.0"
"@angular-devkit/schematics" "8.0.0"
"@yarnpkg/lockfile" "1.1.0"
ini "1.3.5"
pacote "9.5.0"
@ -942,7 +943,7 @@ arrify@^1.0.0, arrify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
asap@~2.0.3:
asap@^2.0.0, asap@~2.0.3:
version "2.0.6"
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
@ -2236,6 +2237,11 @@ debug@^4.1.0, debug@^4.1.1:
dependencies:
ms "^2.1.1"
debuglog@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
@ -2371,6 +2377,14 @@ dev-ip@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/dev-ip/-/dev-ip-1.0.1.tgz#a76a3ed1855be7a012bb8ac16cb80f3c00dc28f0"
dezalgo@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456"
integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=
dependencies:
asap "^2.0.0"
wrappy "1"
di@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c"
@ -5244,6 +5258,16 @@ nopt@^4.0.1:
abbrev "1"
osenv "^0.1.4"
normalize-package-data@^2.0.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==
dependencies:
hosted-git-info "^2.1.4"
resolve "^1.10.0"
semver "2 || 3 || 4 || 5"
validate-npm-package-license "^3.0.1"
normalize-package-data@^2.3.2:
version "2.4.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
@ -6145,6 +6169,29 @@ read-cache@^1.0.0:
dependencies:
pify "^2.3.0"
read-package-json@^2.0.0:
version "2.0.13"
resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a"
integrity sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg==
dependencies:
glob "^7.1.1"
json-parse-better-errors "^1.0.1"
normalize-package-data "^2.0.0"
slash "^1.0.0"
optionalDependencies:
graceful-fs "^4.1.2"
read-package-tree@5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.2.2.tgz#4b6a0ef2d943c1ea36a578214c9a7f6b7424f7a8"
integrity sha512-rW3XWUUkhdKmN2JKB4FL563YAgtINifso5KShykufR03nJ5loGFlkUMe1g/yxmqX073SoYYTsgXu7XdDinKZuA==
dependencies:
debuglog "^1.0.1"
dezalgo "^1.0.0"
once "^1.3.0"
read-package-json "^2.0.0"
readdir-scoped-modules "^1.0.0"
read-pkg-up@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
@ -6192,6 +6239,16 @@ readable-stream@~2.0.6:
string_decoder "~0.10.x"
util-deprecate "~1.0.1"
readdir-scoped-modules@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747"
integrity sha1-n6+jfShr5dksuuve4DDcm19AZ0c=
dependencies:
debuglog "^1.0.1"
dezalgo "^1.0.0"
graceful-fs "^4.1.2"
once "^1.3.0"
readdirp@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78"

View File

@ -221,9 +221,7 @@ class StackblitzBuilder {
_encodeBase64(file) {
// read binary data
var bitmap = fs.readFileSync(file);
// convert binary data to base64 encoded string
return Buffer(bitmap).toString('base64');
return fs.readFileSync(file, { encoding: 'base64' });
}
_existsSync(filename) {

View File

@ -1,4 +1,5 @@
const {resolve} = require('canonical-path');
const semver = require('semver');
const Package = require('dgeni').Package;
const basePackage = require('../angular-base-package');
const contentPackage = require('../content-package');
@ -8,59 +9,60 @@ const CLI_SOURCE_PATH = resolve(CLI_SOURCE_ROOT, 'node_modules/@angular/cli');
const CLI_SOURCE_HELP_PATH = resolve(CLI_SOURCE_PATH, 'help');
// Define the dgeni package for generating the docs
module.exports = new Package('cli-docs', [basePackage, contentPackage])
module.exports =
new Package('cli-docs', [basePackage, contentPackage])
// Register the services and file readers
.factory(require('./readers/cli-command'))
// Register the services and file readers
.factory(require('./readers/cli-command'))
// Register the processors
.processor(require('./processors/processCliContainerDoc'))
.processor(require('./processors/processCliCommands'))
.processor(require('./processors/filterHiddenCommands'))
// Register the processors
.processor(require('./processors/processCliContainerDoc'))
.processor(require('./processors/processCliCommands'))
.processor(require('./processors/filterHiddenCommands'))
// Configure file reading
.config(function(readFilesProcessor, cliCommandFileReader) {
readFilesProcessor.fileReaders.push(cliCommandFileReader);
readFilesProcessor.sourceFiles = readFilesProcessor.sourceFiles.concat([
{
basePath: CLI_SOURCE_HELP_PATH,
include: resolve(CLI_SOURCE_HELP_PATH, '*.json'),
fileReader: 'cliCommandFileReader'
},
{
basePath: CONTENTS_PATH,
include: resolve(CONTENTS_PATH, 'cli/**'),
fileReader: 'contentFileReader'
},
]);
})
// Configure file reading
.config(function(readFilesProcessor, cliCommandFileReader) {
readFilesProcessor.fileReaders.push(cliCommandFileReader);
readFilesProcessor.sourceFiles = readFilesProcessor.sourceFiles.concat([
{
basePath: CLI_SOURCE_HELP_PATH,
include: resolve(CLI_SOURCE_HELP_PATH, '*.json'),
fileReader: 'cliCommandFileReader'
},
{
basePath: CONTENTS_PATH,
include: resolve(CONTENTS_PATH, 'cli/**'),
fileReader: 'contentFileReader'
},
]);
})
.config(function(templateFinder, templateEngine, getInjectables) {
// Where to find the templates for the CLI doc rendering
templateFinder.templateFolders.unshift(resolve(TEMPLATES_PATH, 'cli'));
// Add in templating filters and tags
templateEngine.filters = templateEngine.filters.concat(getInjectables(requireFolder(__dirname, './rendering')));
})
.config(function(templateFinder, templateEngine, getInjectables) {
// Where to find the templates for the CLI doc rendering
templateFinder.templateFolders.unshift(resolve(TEMPLATES_PATH, 'cli'));
// Add in templating filters and tags
templateEngine.filters = templateEngine.filters.concat(
getInjectables(requireFolder(__dirname, './rendering')));
})
.config(function(renderDocsProcessor) {
.config(function(renderDocsProcessor) {
const cliPackage = require(resolve(CLI_SOURCE_PATH, 'package.json'));
const repoUrlParts = cliPackage.repository.url.replace(/\.git$/, '').split('/');
const version = `v${cliPackage.version}`;
const repo = repoUrlParts.pop();
const owner = repoUrlParts.pop();
const cliVersionInfo = {
gitRepoInfo: { owner, repo },
currentVersion: { raw: version }
};
const cliPackage = require(resolve(CLI_SOURCE_PATH, 'package.json'));
const repoUrlParts = cliPackage.repository.url.replace(/\.git$/, '').split('/');
const version = `v${semver.clean(cliPackage.version)}`;
const repo = repoUrlParts.pop();
const owner = repoUrlParts.pop();
const cliVersionInfo = {gitRepoInfo: {owner, repo}, currentVersion: {raw: version}};
// Add the cli version data to the renderer, for use in things like github links
renderDocsProcessor.extraData.cliVersionInfo = cliVersionInfo;
})
// Add the cli version data to the renderer, for use in things like github links
renderDocsProcessor.extraData.cliVersionInfo = cliVersionInfo;
})
.config(function(convertToJsonProcessor, postProcessHtml) {
convertToJsonProcessor.docTypes = convertToJsonProcessor.docTypes.concat(['cli-command', 'cli-overview']);
postProcessHtml.docTypes = postProcessHtml.docTypes.concat(['cli-command', 'cli-overview']);
});
.config(function(convertToJsonProcessor, postProcessHtml) {
convertToJsonProcessor.docTypes =
convertToJsonProcessor.docTypes.concat(['cli-command', 'cli-overview']);
postProcessHtml.docTypes =
postProcessHtml.docTypes.concat(['cli-command', 'cli-overview']);
});

View File

@ -9,7 +9,7 @@
* }
* ```
*/
module.exports = function cliCommandFileReader(log) {
module.exports = function cliCommandFileReader() {
const json5 = require('json5');
return {
name: 'cliCommandFileReader',
@ -26,22 +26,61 @@ module.exports = function cliCommandFileReader(log) {
docType: 'cli-command',
id: `cli-${doc.name}`,
commandAliases: doc.aliases || [],
aliases: computeAliases(doc),
path,
aliases: computeAliases(doc), path,
outputPath: `${path}.json`,
breadCrumbs: [
{ text: 'CLI', path: 'cli' },
{ text: name, path },
{text: 'CLI', path: 'cli'},
{text: name, path},
]
});
if (doc.longDescription) {
doc.longDescriptionDoc = createLongDescriptionDoc(fileInfo);
}
return [result];
} catch (e) {
log.warn(`Failed to read cli command file: "${fileInfo.relativePath}" - ${e.message}`);
throw new Error(
`Failed to read cli command file: "${fileInfo.relativePath}" - ${e.message}`);
}
}
};
};
function computeAliases(doc) {
return [doc.name].concat(doc.aliases || []).map(alias => `cli-${alias}`);
}
function computeAliases(doc) {
return [doc.name].concat(doc.aliases || []).map(alias => `cli-${alias}`);
}
/**
* Synthesize a doc for the CLI command long description, which is used to generate links
* for viewing and editing the long description in GitHub.
*
* The long description is stored in a markdown file that is referenced from the original
* schema file for the command, via the `$longDescription` field. The field is a relative path
* to the markdown file from the schema file.
*
* This function tries to retrieve that original schema based on the file path of the help JSON
* file, which was passed to the `cliCommandFileReader.getDocs()` method.
*/
function createLongDescriptionDoc(fileInfo) {
const path = require('canonical-path');
const fs = require('fs');
const json5 = require('json5');
const schemaJsonPath = path.resolve(fileInfo.basePath, '../commands', fileInfo.relativePath);
try {
const schemaJson = fs.readFileSync(schemaJsonPath);
const schema = json5.parse(schemaJson);
if (schema.$longDescription) {
return {
docType: 'content',
startingLine: 0,
fileInfo: {
realProjectRelativePath:
path.join(path.dirname(fileInfo.realProjectRelativePath), schema.$longDescription)
}
};
}
} catch (e) {
throw new Error(
`Unable to read CLI "$longDescription" info from the schema: "${schemaJsonPath}" - ${e.message}`);
}
}
};

View File

@ -40,7 +40,12 @@ const content = `
}
`;
const fileInfo = {content, baseName: 'add'};
const fileInfo = {
content,
baseName: 'add',
relativePath: 'add.json',
basePath: __dirname + '/mocks/help',
};
describe('cli-command reader', () => {
describe('getDocs', () => {
@ -77,8 +82,8 @@ describe('cli-command reader', () => {
it('should compute the bread crumbs', () => {
const docs = reader.getDocs(fileInfo);
expect(docs[0].breadCrumbs).toEqual([
{ text: 'CLI', path: 'cli' },
{ text: 'add', path: 'cli/add' },
{text: 'CLI', path: 'cli'},
{text: 'add', path: 'cli/add'},
]);
});
@ -89,7 +94,9 @@ describe('cli-command reader', () => {
it('should extract the long description', () => {
const docs = reader.getDocs(fileInfo);
expect(docs[0].longDescription).toEqual('Add support for a library in your project, for example adding `@angular/pwa` which would configure\nyour project for PWA support.\n');
expect(docs[0].longDescription)
.toEqual(
'Add support for a library in your project, for example adding `@angular/pwa` which would configure\nyour project for PWA support.\n');
});
it('should extract the command type', () => {
@ -110,10 +117,19 @@ describe('cli-command reader', () => {
it('should extract the options', () => {
const docs = reader.getDocs(fileInfo);
expect(docs[0].options).toEqual([
jasmine.objectContaining({ name: 'collection' }),
jasmine.objectContaining({ name: 'help' }),
jasmine.objectContaining({ name: 'helpJson' }),
jasmine.objectContaining({name: 'collection'}),
jasmine.objectContaining({name: 'help'}),
jasmine.objectContaining({name: 'helpJson'}),
]);
});
it('should extract file info for the long description', () => {
const [doc] = reader.getDocs(fileInfo);
expect(doc.longDescriptionDoc).toEqual({
docType: 'content',
startingLine: 0,
fileInfo: {realProjectRelativePath: 'packages/angular/cli/commands/add-long.md'}
});
});
});
});

View File

@ -0,0 +1,3 @@
{
"$longDescription": "./add-long.md"
}

View File

@ -14,7 +14,10 @@
{$ cli.renderSyntax(doc) $}
{% if doc.longDescription.length %}
<h2 class="no-anchor">Description</h2>
<h2 class="no-anchor">
{$ github.githubLinks(doc.longDescriptionDoc, cliVersionInfo) $}
Description
</h2>
{$ doc.longDescription | marked $}
{% endif%}

View File

@ -2,24 +2,24 @@
# yarn lockfile v1
"@angular-devkit/architect@0.800.0-rc.2":
version "0.800.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.800.0-rc.2.tgz#4096016fa6df93acbf02be648554631939aa87c0"
integrity sha512-JU/x3UvUW+uVuF0tNkVTRtAvGfbKDXLFI3lm7i40qmts5z1zeQlPjrz+DRTe7msevoVu7DMQTJ7vlbyHUjZOFw==
"@angular-devkit/architect@0.800.2":
version "0.800.2"
resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.800.2.tgz#0924864e57d1e56bddeae257c8779a2662c34e69"
integrity sha512-251GOQwI3254AtnGWZoHmjOMFcz7h6M3fPmRHpYuuhRPIwZnQCKaszYI7gaP9zR7uArLUwsuPo+YYz8lb6Giwg==
dependencies:
"@angular-devkit/core" "8.0.0-rc.2"
"@angular-devkit/core" "8.0.2"
rxjs "6.4.0"
"@angular-devkit/build-angular@0.800.0-rc.2":
version "0.800.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.800.0-rc.2.tgz#df78a27a58813bc442629f8500e1f3d4fd72c519"
integrity sha512-E6P3CO4IUEyCezrBuNwMZ+H/Rg+0R/FH3/TyWiivY5D3bLGvRFJbQE5ZQkVWbd1i1woxvHdqkjgco9hpOko2XQ==
"@angular-devkit/build-angular@0.800.2":
version "0.800.2"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-0.800.2.tgz#712f106f50fb8301816e4417493e98e1e12eb296"
integrity sha512-RlYPEp5FVKosgzWhbI7llM3lGIxAYuCwEPloeUL4XaDasNe2zmLNUlYDVTrF7GpZRoAgiIejmT0HvvKfEuZNZQ==
dependencies:
"@angular-devkit/architect" "0.800.0-rc.2"
"@angular-devkit/build-optimizer" "0.800.0-rc.2"
"@angular-devkit/build-webpack" "0.800.0-rc.2"
"@angular-devkit/core" "8.0.0-rc.2"
"@ngtools/webpack" "8.0.0-rc.2"
"@angular-devkit/architect" "0.800.2"
"@angular-devkit/build-optimizer" "0.800.2"
"@angular-devkit/build-webpack" "0.800.2"
"@angular-devkit/core" "8.0.2"
"@ngtools/webpack" "8.0.2"
ajv "6.10.0"
autoprefixer "9.5.1"
browserslist "4.5.5"
@ -65,30 +65,30 @@
webpack-subresource-integrity "1.1.0-rc.6"
worker-plugin "3.1.0"
"@angular-devkit/build-optimizer@0.800.0-rc.2":
version "0.800.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.800.0-rc.2.tgz#d56cdc127699ad25eb817caf97336d239600f5cb"
integrity sha512-YKTFlAfD4JZk1h4lZDA4HVPPIq1JB5Dxg/Icn2GvcuUws6wVcXUflMTIpBgIMF2j07fMIYPqSAcSBd+UsBJBvA==
"@angular-devkit/build-optimizer@0.800.2":
version "0.800.2"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-optimizer/-/build-optimizer-0.800.2.tgz#4223b2ac8c2a4c05682d1f3cb0417b4630b4a943"
integrity sha512-A/lX7Fjfeh5PspGURV8fJeOsrIYM/7why7mC6v78zdxaErd4S18wUXJDfndjx3qiKyuq76Uu4cQcS7XfClpb8Q==
dependencies:
loader-utils "1.2.3"
source-map "0.5.6"
typescript "3.4.4"
webpack-sources "1.3.0"
"@angular-devkit/build-webpack@0.800.0-rc.2":
version "0.800.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.800.0-rc.2.tgz#c08218f54381157744a3166c0d94b1db180ba063"
integrity sha512-t+/5WqgcsvgPIFGE48I+UWJPDpkQ6E+dKH6RuXec94VBJEv1pC9FJdoi6s/CqEzzPiZsWxJzrWI4dpPAn1eWuA==
"@angular-devkit/build-webpack@0.800.2":
version "0.800.2"
resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.800.2.tgz#af90ea503eece948390bce154a53df9d7c566539"
integrity sha512-Bd/sazcriUTFQCGFDyUkjXSmpn8hRLIyLIXBLAn+5coH4Y4xNy8PXt+hnr6ffwu92h/WnyxKIJi44+5aoUBURA==
dependencies:
"@angular-devkit/architect" "0.800.0-rc.2"
"@angular-devkit/core" "8.0.0-rc.2"
"@angular-devkit/architect" "0.800.2"
"@angular-devkit/core" "8.0.2"
rxjs "6.4.0"
webpack-merge "4.2.1"
"@angular-devkit/core@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-8.0.0-rc.2.tgz#e596a44da215713cdef5405f1477e70626e5d68c"
integrity sha512-hfkQ1QaA0ZIquTNQYJiK0OhdSzdxWY1SJr20JwSBHezAvhN4sJHRBRN9RxGLWdL1d4Z4rUB4KEIvx0cMMk6Ueg==
"@angular-devkit/core@8.0.2":
version "8.0.2"
resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-8.0.2.tgz#22b017b38b4d6127ab2e39a27990fd7962d3844a"
integrity sha512-S2OPYe6Qu7qTS8Q2lzf4qNjXdbN/J2YVnd3wGauMI8Tih5tY/NzUW3h5ds09nRcjsdBDuT0qgf3IMlCZWIABvQ==
dependencies:
ajv "6.10.0"
fast-json-stable-stringify "2.0.0"
@ -96,40 +96,40 @@
rxjs "6.4.0"
source-map "0.7.3"
"@angular-devkit/schematics@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-8.0.0-rc.2.tgz#f4490b1277cdba9622227b178128c76f54e7eca1"
integrity sha512-VuXCRE/PmQWMHaaBbbOq7f2M6/DeKnYUyqG2xpBJaSP+rX7j08gd6RGzkn6V81C6jxt0Q3WkXnQfj5ZQuFnF5w==
"@angular-devkit/schematics@8.0.2":
version "8.0.2"
resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-8.0.2.tgz#854a4366c7dc7462bebd10c24e808b5c9f65b6e2"
integrity sha512-v+g0MOPADJJ5QNNmojCyh2sw1GOzadlbHPdTFqZOm77b2Bi79dRm+yuYMuY6a2nUt7DIcioLRcOFwV8UctajRg==
dependencies:
"@angular-devkit/core" "8.0.0-rc.2"
"@angular-devkit/core" "8.0.2"
rxjs "6.4.0"
"@angular/animations@^8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-8.0.0-rc.2.tgz#aef2683aba35498fe26253bf8f461a1658864e49"
integrity sha512-XTT7Eif6Km6MSbLr6qlCmx8vjRgx/Hp5Hv1WnnPtRFt8XeidYGGYIq2si3CxQ2xBjEO3OpNbPqtYvZKH1yuBdA==
"@angular/animations@^8.1.0-next.1":
version "8.1.0-next.1"
resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-8.1.0-next.1.tgz#6c79ac16b7da239b7823259994d2b379d883dd68"
integrity sha512-drwdK7ARU41hGj6JebO7gF0MeeNz3qSMoPs8zRqjC3sfWZ4Jp9eNlfTf1b86gd6w9GMeOna/JjwxUeNEmxdLBw==
dependencies:
tslib "^1.9.0"
"@angular/cdk@8.0.0-rc.0":
version "8.0.0-rc.0"
resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.0.0-rc.0.tgz#64731574ddcf6912b079e03efab95464ce17acee"
integrity sha512-fa0AFR/v4t4rVFUwqpfRnzRhzyoReYcssjR6fQ4WMMxbhRHNZSJaPxvnykMOZsh7oQy0d6Dy4kENO6nXZptR9g==
"@angular/cdk@8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/cdk/-/cdk-8.0.0.tgz#34ca95e71d71780b29b5ba07318c88c4577bdc25"
integrity sha512-2vsRWEHNARe0iRmqgzvM67gwfRy+aKvdef4Qu9L+ndSsTrrZT3tSgG8SMn1v9SfBHnx5G8mo4d1AMquXG69AuQ==
dependencies:
tslib "^1.7.1"
optionalDependencies:
parse5 "^5.0.0"
"@angular/cli@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-8.0.0-rc.2.tgz#fda3c42c3682a53168be67c0624db04144c0aa9c"
integrity sha512-Aj5JJKa6JxNU3U9InvveIhU8gg6ZA1UvvKHHzX87FsUQhHzm7XIfwC5JrYGDE4c9ErIE40J3we7Hcsv2AjzkTw==
"@angular/cli@8.0.2":
version "8.0.2"
resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-8.0.2.tgz#b64c044342f0af2ed7e78e51c54087693407a47b"
integrity sha512-xXSCwTKonC6nMqKPDlEFhXjKBu85jVB+KYo2tLU+RKtgFeIF/hTaUWQTvWXRwRsQAfBhB1cwe0oijdljOItTgw==
dependencies:
"@angular-devkit/architect" "0.800.0-rc.2"
"@angular-devkit/core" "8.0.0-rc.2"
"@angular-devkit/schematics" "8.0.0-rc.2"
"@schematics/angular" "8.0.0-rc.2"
"@schematics/update" "0.800.0-rc.2"
"@angular-devkit/architect" "0.800.2"
"@angular-devkit/core" "8.0.2"
"@angular-devkit/schematics" "8.0.2"
"@schematics/angular" "8.0.2"
"@schematics/update" "0.800.2"
"@yarnpkg/lockfile" "1.1.0"
debug "^4.1.1"
ini "1.3.5"
@ -137,22 +137,23 @@
npm-package-arg "6.1.0"
open "6.2.0"
pacote "9.5.0"
read-package-tree "5.2.2"
semver "6.0.0"
symbol-observable "1.2.0"
universal-analytics "^0.4.20"
uuid "^3.3.2"
"@angular/common@^8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/common/-/common-8.0.0-rc.2.tgz#77b2da22cb11bf2039799d56ec2fb7c4f51a1374"
integrity sha512-/MUZhebMAkAwV8jkimBONN2eOQ2/5qO54ZvPypyy2tEHk69JRNLFjREaR+VU8yGlS/1MU6jTYxyfRW2c8ggLzA==
"@angular/common@^8.1.0-next.1":
version "8.1.0-next.1"
resolved "https://registry.yarnpkg.com/@angular/common/-/common-8.1.0-next.1.tgz#2b6674ad46c13d0e24fedb6f239d338448ca72b0"
integrity sha512-sHzv1QIt2g6stXVqIiHpR2yk8goA3nek1FohUWz4H9mE24Knb4qSNvn25wztYdH5n5WPY+jyHyhWrqoXtrPvuQ==
dependencies:
tslib "^1.9.0"
"@angular/compiler-cli@^8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-8.0.0-rc.2.tgz#a3ef74f3e4ea448ccf1387c18c32fc664b67b2e1"
integrity sha512-lLhedaTQ08/i4aysCPpTYbAP0/8T5/EHE79FByp/7XxqRuQxcXkFJujQT1Q/KReKa0gA9JEYD4I1eBJpNYyMLQ==
"@angular/compiler-cli@^8.1.0-next.1":
version "8.1.0-next.1"
resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-8.1.0-next.1.tgz#27047724d40a40b172497a0ebc40846a16bc481b"
integrity sha512-pJ5s5cEh/cXasMwUzJLwypoSaDzmAV6tfOKhm3bN6dfSh1bS8jliElIwxgPkqlUv9zo4Io/RZD4KgvwBzD7WSw==
dependencies:
canonical-path "1.0.0"
chokidar "^2.1.1"
@ -166,71 +167,71 @@
tslib "^1.9.0"
yargs "13.1.0"
"@angular/compiler@^8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-8.0.0-rc.2.tgz#8395c20d2d7e93c6941a45b039e03ae7a6277797"
integrity sha512-/NR0EN6wjit2mfgOhWirOjKp+s7lO1QSKhzK3TjYCda1L7Pijo29s3BGMWUSPCRno8zNH5o7Q0mWCC55MBGB4w==
"@angular/compiler@^8.1.0-next.1":
version "8.1.0-next.1"
resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-8.1.0-next.1.tgz#e0dadb973b15497d9afccccd1e56ae36c3a32014"
integrity sha512-3Qh4cSEPX3C2c+J9xea0CNnoy/UqtCqHzVuslfCdTRrgdCYx2xxcHvmwZHccDyTCTW8bX7C4jjr0Gf1w1lANlg==
dependencies:
tslib "^1.9.0"
"@angular/core@^8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/core/-/core-8.0.0-rc.2.tgz#800fd49bbc176f7ee064375b726503c5e6c8387c"
integrity sha512-ImXzoQk8U3IiL75dJWnO/aIGfaExgiqDc6GJYgQ8PvB7ZUkdUOj/a+jd6asMvE52VZJkof5XShhdonTScPcdUA==
"@angular/core@^8.1.0-next.1":
version "8.1.0-next.1"
resolved "https://registry.yarnpkg.com/@angular/core/-/core-8.1.0-next.1.tgz#ff8c51089a46e5fdaaa77bb65efb1b07aee47d68"
integrity sha512-i26/UkfTOd+nZuPbUOgGHGSWwl1fghUlLwQHvDqtdMC2VANQOjEyQZrcNHP+N7ZumVdcfxDAisFOMWgnwFzVcw==
dependencies:
tslib "^1.9.0"
"@angular/elements@^8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/elements/-/elements-8.0.0-rc.2.tgz#84ca2aadff66bfcd3c8042492a0c6b87a6a749fa"
integrity sha512-7KVPDSGXo33WD+ZQHjmvSXyBa6az6MHIQo3I+wRKUB9pBZNqMa2Dcb7FQp7fq3tQTEpOW6fO52ozxAZ/ybozxA==
"@angular/elements@^8.1.0-next.1":
version "8.1.0-next.1"
resolved "https://registry.yarnpkg.com/@angular/elements/-/elements-8.1.0-next.1.tgz#dbe64cc671bf94cafbad4225905f287cdb37ea01"
integrity sha512-exxENgFIgUlKJcCrj0LyiAYPUhu5wNk5XfRCVXxoNIGXgsMtrKGXX5HYrZyRtKJhCwyvkuLg7IjdBzD9KoThrw==
dependencies:
tslib "^1.9.0"
"@angular/forms@^8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-8.0.0-rc.2.tgz#f4db4653470b74cd55508aa83da761309a1d341d"
integrity sha512-rjjGNVaxwOayuZCpsG8V13RK/h7S6v5ItzG6Ai1agO/em4/riNhEP3+BvxM4Rs1v4AfGOd+LhOeLt5qptj0JKA==
"@angular/forms@^8.1.0-next.1":
version "8.1.0-next.1"
resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-8.1.0-next.1.tgz#5cfee3f7e9ad8add06fe25419b06c8a7f8b9f72d"
integrity sha512-NRiiV06FoMXU99eKv8poKEp1+VQntZnD8ADv4Z9YcU6XhngO09c0K/jmHABGh6oym+GtF2gRocTZ65a2FeUeDw==
dependencies:
tslib "^1.9.0"
"@angular/language-service@^8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-8.0.0-rc.2.tgz#5b8fd13b7cd9e7cc1c097f92749f05e72b1c7e47"
integrity sha512-PXsntGd053iiM9lJPo7jmjhd5dp6AxugEC4WDTXimZ3vK2Hzv53CnKuVTUGcTWjwazbKAEyG0jiUl4VXptwTAA==
"@angular/language-service@^8.1.0-next.1":
version "8.1.0-next.1"
resolved "https://registry.yarnpkg.com/@angular/language-service/-/language-service-8.1.0-next.1.tgz#35b72dd320b46abe631f209759e5c939d8b2b725"
integrity sha512-LlpStVhf4GEazD6/6i8DftNndEkrBoTxd6Bi5kFHrDmJB+cT5evVZHomXJcwHjZx31gpcLAot6lr7WCRkmbD0g==
"@angular/material@8.0.0-rc.0":
version "8.0.0-rc.0"
resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.0.0-rc.0.tgz#c5170f9617abba3176e991a1e197e1efa0bff95a"
integrity sha512-8J+oPHxcoDJnZUE+j5eYDR5FS/zN7RHljK2FtjiG2wsGGRiomnMLQBoFCQL55P1sgqWz3l4vKgi5GuwA65pADQ==
"@angular/material@8.0.0":
version "8.0.0"
resolved "https://registry.yarnpkg.com/@angular/material/-/material-8.0.0.tgz#21dd15c318d1e29eb4d1a2dd888ddb027897eb49"
integrity sha512-c7O7GhZd46xF2WB6T/YPam5lJkTgQLdIS53IqwZIFhL427+SEfPvejVzRnVfZCI3NdrKiWt/5VsvtQZwWzlGvw==
dependencies:
tslib "^1.7.1"
"@angular/platform-browser-dynamic@^8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.0.0-rc.2.tgz#86e8e227f19aa9c6ef4439623ce6cf7f2b0cd3b1"
integrity sha512-c4QXgAikQx25AOnNiQUOe/yNJunR95rfTJ5yApcNU76eeCMG9KLFNGGQTg+PmcxZ6UMcw9zp2Tck9vjSb2BZYg==
"@angular/platform-browser-dynamic@^8.1.0-next.1":
version "8.1.0-next.1"
resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-8.1.0-next.1.tgz#6e927d97583ec2bb9a9803c0f5003ef41fc39d9e"
integrity sha512-BDeLlzpg7T2nv3Y6ywQAW+cBAgbSQUku7W1p71vFGqE8p4c79HmKbykGSR1/n7Sez8LV+N1LpliCrNQEgGtBaA==
dependencies:
tslib "^1.9.0"
"@angular/platform-browser@^8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-8.0.0-rc.2.tgz#b40fa05fd32422be499ab3986bc3031374f7c5bc"
integrity sha512-ErzIDckIqic9rmqMFk4scRX+lo7AWifOP+IOCot1KGPdQ7+CP/h/neJ9fiIzYTSDYUm5xk5i+2aW+2SWRJYQdA==
"@angular/platform-browser@^8.1.0-next.1":
version "8.1.0-next.1"
resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-8.1.0-next.1.tgz#0cf2b04437d190687d7efbaa6b7e9be5f5a076e2"
integrity sha512-EkDgr1wWW2eAd542k46JKb9jIr50M5eiq49QjDVmnjXCS1WNIyiW1TxTpyOiDNz8nK0jHYTzEw+PWEyvmwJV8Q==
dependencies:
tslib "^1.9.0"
"@angular/router@^8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/router/-/router-8.0.0-rc.2.tgz#e0e4636f56fc08760863486f45f203bb9b00543e"
integrity sha512-7NnRdEykm0FJf/SHjUWz3cgGDtW5KM2gKm8it8V8azr3vIiMRYyqhDqCKkhutjt7C+yKNotB5M7Da9uYf0n/xQ==
"@angular/router@^8.1.0-next.1":
version "8.1.0-next.1"
resolved "https://registry.yarnpkg.com/@angular/router/-/router-8.1.0-next.1.tgz#b957531748e153ddafb666fd8cd68546a7508e54"
integrity sha512-balgDD3IlsnWs+WWuSAQn3oXULbh44oklqBQgDAl8CX94ki0jDCeVFob57cCflqRx7WjtxB053X9keg6EA2YtA==
dependencies:
tslib "^1.9.0"
"@angular/service-worker@^8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-8.0.0-rc.2.tgz#e73374fe4ccd8c15790f007832a5e60576ed85d9"
integrity sha512-uudl7+P9Xov9naoW7Ruv0rvvp+jYWe3P3OOpRul8X6tTYarKnorj3F44Y5GoNO5Xxjp0psPSD558rXrrIBt98w==
"@angular/service-worker@^8.1.0-next.1":
version "8.1.0-next.1"
resolved "https://registry.yarnpkg.com/@angular/service-worker/-/service-worker-8.1.0-next.1.tgz#bf00349b1993a6ecda07b9c08920b16aae176950"
integrity sha512-lctU2Dq96ovsFU/e7vIKUUvg+k5H2w+RHOx8ARlgraCU3T5fYyriQvZ9GH7y86fkAFtSrQ6MX0+pnY5dFUUZ1Q==
dependencies:
tslib "^1.9.0"
@ -316,32 +317,32 @@
through2 "^2.0.0"
xdg-basedir "^3.0.0"
"@ngtools/webpack@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-8.0.0-rc.2.tgz#d8321a89b2c14fcb627d3d5e326b4125b283f08c"
integrity sha512-0pXtkvbwp53z+BgQwBllyIHjMM082phkM8hFwlEHCbYeWkSRBqDld7HgzXBEwpBe+4MKjtWF2xXbDp/4BdTjOQ==
"@ngtools/webpack@8.0.2":
version "8.0.2"
resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-8.0.2.tgz#d60167b514b531ed6ae308b4911739dd102e41c7"
integrity sha512-5P0FHF4p5H/G9xGjOG9meDViXcdW3RPdJa2nX1gGpii3/dhFhmU4pxjKn1Bfs4x+PB9FQQvhSvGIBLNf+B4y5Q==
dependencies:
"@angular-devkit/core" "8.0.0-rc.2"
"@angular-devkit/core" "8.0.2"
enhanced-resolve "4.1.0"
rxjs "6.4.0"
tree-kill "1.2.1"
webpack-sources "1.3.0"
"@schematics/angular@8.0.0-rc.2":
version "8.0.0-rc.2"
resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-8.0.0-rc.2.tgz#94bc9bb68d75e07142a37f4881c287063d460df2"
integrity sha512-sBIUz2xEBZJxXAiIsJEaTI7G8r1Mc0aI0tNnw0vQLF6sMSaVKJssN2gYg5dmceDXohJtcgdc3hN1xPL6ZpvsdA==
"@schematics/angular@8.0.2":
version "8.0.2"
resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-8.0.2.tgz#80d2a4d55f89b0f843f64d38f588ccca4fdf4de2"
integrity sha512-mN9qsoBVpbY1Q7BP8WaiHsyDv+kl5WrIHw/9OASLrGZcoVY7+oj2CfznVq0XRwvVjDtm6ZFor5ruxLF9dQUOSw==
dependencies:
"@angular-devkit/core" "8.0.0-rc.2"
"@angular-devkit/schematics" "8.0.0-rc.2"
"@angular-devkit/core" "8.0.2"
"@angular-devkit/schematics" "8.0.2"
"@schematics/update@0.800.0-rc.2":
version "0.800.0-rc.2"
resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.800.0-rc.2.tgz#4ea24343c32f47ee7c2f2404fb67a50331dc8b1a"
integrity sha512-oWnxEoscVHfzz0mEvfqwe7hRw4fzsYOmnZEVVLAb62lZQdPQHitflBITI+ubrPmHSgILHoBAWqOYlkuEKVXVAg==
"@schematics/update@0.800.2":
version "0.800.2"
resolved "https://registry.yarnpkg.com/@schematics/update/-/update-0.800.2.tgz#48d23bf60f2870f0887946165cad42c243c4faac"
integrity sha512-HPjbzr/LfFLdMzi6zMQK8mPyLw+nt+m7OQsdoeOkFgHkHVfHrKQWcOGt4A0D6keDJ6K2g7W5CsqFR6/GMac7Mg==
dependencies:
"@angular-devkit/core" "8.0.0-rc.2"
"@angular-devkit/schematics" "8.0.0-rc.2"
"@angular-devkit/core" "8.0.2"
"@angular-devkit/schematics" "8.0.2"
"@yarnpkg/lockfile" "1.1.0"
ini "1.3.5"
pacote "9.5.0"
@ -1026,7 +1027,7 @@ as-array@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/as-array/-/as-array-2.0.0.tgz#4f04805d87f8fce8e511bc2108f8e5e3a287d547"
asap@^2.0.3, asap@~2.0.3:
asap@^2.0.0, asap@^2.0.3, asap@~2.0.3:
version "2.0.6"
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
integrity sha1-5QNHYR1+aQlDIIu9r+vLwvuGbUY=
@ -2700,6 +2701,11 @@ debug@^3.0.0, debug@^3.1.0, debug@^3.2.5, debug@^3.2.6:
dependencies:
ms "^2.1.1"
debuglog@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
integrity sha1-qiT/uaw9+aI1GDfPstJ5NgzXhJI=
decamelize@^1.1.1, decamelize@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
@ -2872,6 +2878,14 @@ detect-node@^2.0.4:
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c"
integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==
dezalgo@^1.0.0:
version "1.0.3"
resolved "https://registry.yarnpkg.com/dezalgo/-/dezalgo-1.0.3.tgz#7f742de066fc748bc8db820569dddce49bf0d456"
integrity sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=
dependencies:
asap "^2.0.0"
wrappy "1"
dgeni-packages@^0.27.1:
version "0.27.2"
resolved "https://registry.yarnpkg.com/dgeni-packages/-/dgeni-packages-0.27.2.tgz#ca1b40147a56668db2f4a2f09a374c6355f45cfa"
@ -7077,7 +7091,7 @@ nopt@^4.0.1:
abbrev "1"
osenv "^0.1.4"
normalize-package-data@^2.3.2:
normalize-package-data@^2.0.0, normalize-package-data@^2.3.2:
version "2.5.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8"
integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==
@ -8261,6 +8275,29 @@ read-cache@^1.0.0:
dependencies:
pify "^2.3.0"
read-package-json@^2.0.0:
version "2.0.13"
resolved "https://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a"
integrity sha512-/1dZ7TRZvGrYqE0UAfN6qQb5GYBsNcqS1C0tNK601CFOJmtHI7NIGXwetEPU/OtoFHZL3hDxm4rolFFVE9Bnmg==
dependencies:
glob "^7.1.1"
json-parse-better-errors "^1.0.1"
normalize-package-data "^2.0.0"
slash "^1.0.0"
optionalDependencies:
graceful-fs "^4.1.2"
read-package-tree@5.2.2:
version "5.2.2"
resolved "https://registry.yarnpkg.com/read-package-tree/-/read-package-tree-5.2.2.tgz#4b6a0ef2d943c1ea36a578214c9a7f6b7424f7a8"
integrity sha512-rW3XWUUkhdKmN2JKB4FL563YAgtINifso5KShykufR03nJ5loGFlkUMe1g/yxmqX073SoYYTsgXu7XdDinKZuA==
dependencies:
debuglog "^1.0.1"
dezalgo "^1.0.0"
once "^1.3.0"
read-package-json "^2.0.0"
readdir-scoped-modules "^1.0.0"
read-pkg-up@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02"
@ -8363,6 +8400,16 @@ readable-stream@~2.0.0:
string_decoder "~0.10.x"
util-deprecate "~1.0.1"
readdir-scoped-modules@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747"
integrity sha1-n6+jfShr5dksuuve4DDcm19AZ0c=
dependencies:
debuglog "^1.0.1"
dezalgo "^1.0.0"
graceful-fs "^4.1.2"
once "^1.3.0"
readdirp@^2.0.0, readdirp@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525"
@ -8835,10 +8882,10 @@ rxjs@6.4.0, rxjs@^6.4.0:
dependencies:
tslib "^1.9.0"
rxjs@^6.5.1:
version "6.5.1"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.1.tgz#f7a005a9386361921b8524f38f54cbf80e5d08f4"
integrity sha512-y0j31WJc83wPu31vS1VlAFW5JGrnGC+j+TtGAa1fRQphy48+fDYiDmX8tjGloToEsMkxnouOg/1IzXGKkJnZMg==
rxjs@^6.5.2:
version "6.5.2"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.5.2.tgz#2e35ce815cd46d84d02a209fb4e5921e051dbec7"
integrity sha512-HUb7j3kvb7p7eCUHE3FqjoDsC1xfZQ4AHFWfTKSpZ+sAhhz5X1WX0ZuUqWbzB2QhSLp3DoLUG+hMdEDKqWo2Zg==
dependencies:
tslib "^1.9.0"

View File

@ -27,7 +27,6 @@ function testBazel() {
ng new demo --collection=@angular/bazel --routing --skip-git --skip-install --style=scss
cd demo
installLocalPackages
yarn webdriver-manager update --gecko=false --standalone=false ${CI_CHROMEDRIVER_VERSION_ARG:---versions.chrome 2.45}
ng generate component widget --style=css
ng build
ng test
@ -42,8 +41,8 @@ function testBazel() {
function testNonBazel() {
# Replace angular.json that uses Bazel builder with the default generated by CLI
mv ./angular.json.bak ./angular.json
mv ./tsconfig.json.bak ./tsconfig.json
rm -rf dist src/main.dev.ts src/main.prod.ts
yarn webdriver-manager update --gecko=false --standalone=false ${CI_CHROMEDRIVER_VERSION_ARG:---versions.chrome 2.45}
ng build --progress=false
ng test --progress=false --watch=false
ng e2e --configuration=production --webdriver-update=false

View File

@ -30,7 +30,7 @@
rxjs "6.4.0"
"@angular/bazel@file:../../dist/packages-dist/bazel":
version "8.0.0-beta.13"
version "0.0.0"
dependencies:
"@angular-devkit/architect" "^0.800.0-beta.15"
"@angular-devkit/core" "^8.0.0-beta.15"
@ -40,7 +40,7 @@
"@types/node" "6.0.84"
semver "^5.6.0"
shelljs "0.8.2"
tsickle "0.34.3"
tsickle "^0.35.0"
"@angular/cli@file:../../node_modules/@angular/cli":
version "8.0.0-beta.15"
@ -62,27 +62,27 @@
universal-analytics "^0.4.20"
uuid "^3.3.2"
"@bazel/bazel-darwin_x64@0.24.0":
version "0.24.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.24.0.tgz#828ef298d8d542961df388f17b0244f4f4302a74"
integrity sha512-xly44vkcD/fauUb7Lm5Lme4qhEZdkuuyBKSVQUHPbYAGDdbj/W8dupI3bZREkJAgG/WrRU+WXUemMj4U8ZcLcw==
"@bazel/bazel-darwin_x64@0.26.1":
version "0.26.1"
resolved "https://registry.yarnpkg.com/@bazel/bazel-darwin_x64/-/bazel-darwin_x64-0.26.1.tgz#1b5c69b635e5c2a8c3090fa5f6bcb45735f06045"
integrity sha512-9VjrR+ce+iS9xS1lgeAo1RAPXlxCvez/r3smN1lP4s4YNF0s5LAT0cevIl6Zz2nwyEha/6JvY3v6Euemy36F0w==
"@bazel/bazel-linux_x64@0.24.0":
version "0.24.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.24.0.tgz#9ef2e7266833ad2221fe4af4ceb6763d2897e3ff"
integrity sha512-p5ylPLWnJZDGbaIFBrtD/tp3Su5rMdzeeNJKU24XyiWQTHVZ3OD3I2Fb0ILCgfBjY8AlA7EtCtOI4hYnAuIOtg==
"@bazel/bazel-linux_x64@0.26.1":
version "0.26.1"
resolved "https://registry.yarnpkg.com/@bazel/bazel-linux_x64/-/bazel-linux_x64-0.26.1.tgz#04dd194bdcd6b9d45bd865a9a60c280d0d600251"
integrity sha512-oZooDxI1C4p7o18zx2Uns2cK/NN2hgF2YSBKH0aVDPAAxQA85h+g124CWDEbsghOdRMSBM0Hd0SSeIqwZcqLSw==
"@bazel/bazel-win32_x64@0.24.0":
version "0.24.0"
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.24.0.tgz#02d83113a6c6ed99795a3e41bff5631aa141638d"
integrity sha512-/bcSEx+GoV/q7H4WM0jazfxTcurSiIIePhRv+d05mxRDcaWwhCO8KzmmZRWH1abW6npvq5tLkbSQi7G7nUBhgg==
"@bazel/bazel-win32_x64@0.26.1":
version "0.26.1"
resolved "https://registry.yarnpkg.com/@bazel/bazel-win32_x64/-/bazel-win32_x64-0.26.1.tgz#9351f07313173b1f98006da8131c94db7aa7c506"
integrity sha512-0FkOo8+bxw13X2m6ALhXX2241gG9ZXgcLu0E/IbCWy/TmOB5bR0Z73CslszWbXIldVYnANuhFmnkxIa745Du5Q==
"@bazel/bazel@file:../../node_modules/@bazel/bazel":
version "0.24.0"
version "0.26.1"
optionalDependencies:
"@bazel/bazel-darwin_x64" "0.24.0"
"@bazel/bazel-linux_x64" "0.24.0"
"@bazel/bazel-win32_x64" "0.24.0"
"@bazel/bazel-darwin_x64" "0.26.1"
"@bazel/bazel-linux_x64" "0.26.1"
"@bazel/bazel-win32_x64" "0.26.1"
"@microsoft/api-extractor@^7.0.21":
version "7.0.22"
@ -1610,10 +1610,10 @@ tough-cookie@~2.4.3:
psl "^1.1.24"
punycode "^1.4.1"
tsickle@0.34.3:
version "0.34.3"
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.34.3.tgz#8085067a26d7bff466ddadb2eba18849b49159b8"
integrity sha512-mb1v3nsr6rYaZky22xj0d6qv4ogAR40Bc6r37jwWOg3bEIO/ZppEFZiEADs/NNVLcWTPgmNmPZgaX5CfAH6oXA==
tsickle@^0.35.0:
version "0.35.0"
resolved "https://registry.yarnpkg.com/tsickle/-/tsickle-0.35.0.tgz#59235df45937c0ec5d072c616c26d2d97fba54b9"
integrity sha512-irsZLX4293YUl9TuwNC5Fy020eLSc4bC3LfKnxnx1oq5wmZD9zSP8qvNNTiwRmf2/rxH+58JINcTARDjuvn+oQ==
dependencies:
minimist "^1.2.0"
mkdirp "^0.5.1"

View File

@ -0,0 +1 @@
node_modules

View File

@ -16,3 +16,7 @@ build --define=compile=legacy
# Don't create symlinks
build --symlink_prefix=/
# Turn on managed directories feature in Bazel
# This allows us to avoid installing a second copy of node_modules
common --experimental_allow_incremental_repository_updates

View File

@ -1,28 +1,30 @@
workspace(name = "bazel_integration_test")
workspace(
name = "bazel_integration_test",
managed_directories = {"@npm": ["node_modules"]},
)
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# Fetch rules_nodejs so we can install our npm dependencies
http_archive(
name = "build_bazel_rules_nodejs",
sha256 = "3a3efbf223f6de733475602844ad3a8faa02abda25ab8cfe1d1ed0db134887cf",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.27.12/rules_nodejs-0.27.12.tar.gz"],
sha256 = "e04a82a72146bfbca2d0575947daa60fda1878c8d3a3afe868a8ec39a6b968bb",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/0.31.1/rules_nodejs-0.31.1.tar.gz"],
)
# Fetch sass rules for compiling sass files
# TODO: change back to upstream release after https://github.com/bazelbuild/rules_sass/pull/87 merged and released
http_archive(
name = "io_bazel_rules_sass",
sha256 = "dbe9fb97d5a7833b2a733eebc78c9c1e3880f676ac8af16e58ccf2139cbcad03",
strip_prefix = "rules_sass-1.11.0",
url = "https://github.com/bazelbuild/rules_sass/archive/1.11.0.zip",
strip_prefix = "rules_sass-9862dfc96a4a1f66fe171ef5e043b29853e8445b",
url = "https://github.com/manekinekko/rules_sass/archive/9862dfc96a4a1f66fe171ef5e043b29853e8445b.zip",
)
# Check the bazel version and download npm dependencies
load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")
# Bazel version must be at least v0.21.0 because:
# - 0.21.0 Using --incompatible_strict_action_env flag fixes cache when running `yarn bazel`
# (see https://github.com/angular/angular/issues/27514#issuecomment-451438271)
# Bazel version must be at least the following version because:
# - 0.26.0 managed_directories feature added which is required for nodejs rules 0.30.0
check_bazel_version(
message = """
You no longer need to install Bazel on your machine.
@ -31,7 +33,7 @@ Try running `yarn bazel` instead.
(If you did run that, check that you've got a fresh `yarn install`)
""",
minimum_bazel_version = "0.21.0",
minimum_bazel_version = "0.26.0",
)
# Setup the Node.js toolchain
@ -43,12 +45,8 @@ node_repositories(
# Install our npm dependencies into @npm
yarn_install(
name = "npm",
data = [
# Needed because this tsconfig file is used in the "postinstall" script.
"//:angular-metadata.tsconfig.json",
],
package_json = "//src:package.json",
yarn_lock = "//src:yarn.lock",
package_json = "//:package.json",
yarn_lock = "//:yarn.lock",
)
# Install all bazel dependencies of our npm packages

View File

@ -4,14 +4,32 @@
"version": "0.0.0",
"license": "MIT",
"dependencies": {
"@angular/animations": "file:../../dist/packages-dist/animations",
"@angular/common": "file:../../dist/packages-dist/common",
"@angular/core": "file:../../dist/packages-dist/core",
"@angular/platform-browser": "file:../../dist/packages-dist/platform-browser",
"@angular/platform-browser-dynamic": "file:../../dist/packages-dist/platform-browser-dynamic",
"@angular/router": "file:../../dist/packages-dist/router",
"reflect-metadata": "0.1.12",
"rxjs": "6.4.0",
"tslib": "1.9.3",
"zone.js": "0.9.1"
},
"devDependencies": {
"@bazel/bazel": "file:../../node_modules/@bazel/bazel"
"@angular/bazel": "file:../../dist/packages-dist/bazel",
"@angular/compiler": "file:../../dist/packages-dist/compiler",
"@angular/compiler-cli": "file:../../dist/packages-dist/compiler-cli",
"@bazel/bazel": "file:../../node_modules/@bazel/bazel",
"@bazel/karma": "0.30.1",
"@bazel/typescript": "0.30.1",
"@types/jasmine": "2.8.8",
"@types/source-map": "0.5.1",
"protractor": "5.1.2",
"typescript": "3.4.2"
},
"scripts": {
"//": "deps are listed in src/package.json which is used by yarn_install",
"//": "this package.json file is only here so that `yarn test` can be called by /integration/run_tests.sh",
"pretest": "./pretest.sh",
"test": "bazel build ... --noshow_progress && bazel test ..."
"test": "bazel build ... --noshow_progress && bazel test ...",
"postinstall": "ngc -p ./angular-metadata.tsconfig.json",
"//": "TODO(gregmagolan): figure out how to keep dependencies here up to date with the root package.json"
}
}
}

View File

@ -1,20 +0,0 @@
#!/usr/bin/env bash
set -eux -o pipefail
# -e: exits if a command fails
# -u: errors if an variable is referenced before being set
# -x: shows the commands that get run
# -o pipefail: causes a pipeline to produce a failure return code if any command errors
# sedi makes `sed -i` work on both OSX & Linux
# See https://stackoverflow.com/questions/2320564/i-need-my-sed-i-command-for-in-place-editing-to-work-with-both-gnu-sed-and-bsd
sedi () {
case $(uname) in
Darwin*) sedi=('-i' '') ;;
*) sedi='-i' ;;
esac
sed "${sedi[@]}" "$@"
}
sedi "s#packages-dist:#file://$PWD/../../dist/packages-dist/#" src/package.json

View File

@ -47,7 +47,7 @@ ts_devserver(
rollup_bundle(
name = "bundle",
entry_point = "src/main",
entry_point = ":main.ts",
deps = [
"//src",
# TODO(kyliau): These are not necessary. Bundle compiles fine without

View File

@ -25,7 +25,7 @@ ng_module(
ng_package(
name = "npm_package",
entry_point = "src/hello-world/index.js",
entry_point = ":index.ts",
deps = [":hello-world"],
)

Some files were not shown because too many files have changed in this diff Show More