26 Commits

Author SHA1 Message Date
Brandon
12c9bd257d docs: add new getting started guide ()
PR Close 
2019-03-29 10:47:37 -07:00
Pete Bacon Darwin
bdcbd9ed4b fix(ivy): ngcc - teach Esm5ReflectionHost about aliased variables ()
Sometimes, in ESM5 code, aliases to exported variables are used internally
to refer to the exported value. This prevented some analysis from being
able to match up a reference to an export to the actual export itself.

For example in the following code:

```
var HttpClientXsrfModule = /** @class */ (function () {
  function HttpClientXsrfModule() {
  }
  HttpClientXsrfModule_1 = HttpClientXsrfModule;
  HttpClientXsrfModule.withOptions = function (options) {
      if (options === void 0) { options = {}; }
      return {
          ngModule: HttpClientXsrfModule_1,
          providers: [],
      };
  };
  var HttpClientXsrfModule_1;
  HttpClientXsrfModule = HttpClientXsrfModule_1 = tslib_1.__decorate([
      NgModule({
          providers: [],
      })
  ], HttpClientXsrfModule);
  return HttpClientXsrfModule;
}());
```

We were not able to tell that the `ngModule: HttpClientXsrfModule_1` property
assignment was actually meant to refer to the `function HttpClientXrsfModule()`
declaration.  This caused the `ModuleWithProviders` processing to fail.

This commit ensures that we can compile typings files using the ESM5
format, so we can now update the examples boilerplate tool so that it
does not need to compile the ESM2015 format at all.

PR Close 
2019-03-20 14:45:55 -04:00
Pete Bacon Darwin
7b55ba58b9 refactor(ivy): ngcc - remove flat-format and use AbsoluteFsPath ()
Now that we are using package.json properties to indicate which
entry-point format to compile, it turns out that we don't really
need to distinguish between flat and non-flat formats, unless we
are compiling `@angular/core`.

PR Close 
2019-03-20 14:45:54 -04:00
Pete Bacon Darwin
cd449021c1 feat(ivy): ngcc - compile only specified package.json format properties ()
You can now specify a list of properties in the package.json that
should be considered (in order) to find the path to the format to compile.

The build marker system has been updated to store the markers in
the package.json rather than an additional external file.
Also instead of tracking the underlying bundle format that was compiled,
it now tracks the package.json property.

BREAKING CHANGE:

The `proertiesToConsider` option replaces the previous `formats` option,
which specified the final bundle format, rather than the property in the
package.json.
If you were using this option to compile only specific bundle formats,
you must now modify your usage to pass in the properties in the package.json
that map to the format that you wish to compile.

In the CLI, the `--formats` is no longer available. Instead use the
`--properties` option.

FW-1120

PR Close 
2019-03-20 14:45:54 -04:00
Judy Bogart
bc99b774ba docs: add schematics guide ()
PR Close 
2019-03-19 15:47:14 -04:00
Paul Gschwendtner
5874247494 build(docs-infra): examples should not run ngcc for all formats ()
Currently when adding the example boilerplate to all
examples with Ivy enabled, we run Ngcc and transform
all found formats. This potentially slows down the build and
is not necessary as we only need the "fesm5" and "fesm2015" bundles.

PR Close 
2019-02-28 10:46:12 -08:00
Marc Laval
1e6ed52cba fix(docs-infra): all examples should get Ivy boilerplate ()
PR Close 
2019-02-16 20:59:16 -08:00
Brandon
99e3a04ea2 ci(docs-infra): test docs examples with Ivy ()
PR Close 
2019-02-11 17:16:52 +00:00
George Kalpakas
18ccfc6d73 feat(docs-infra): add service-worker project type ()
File overwrites:
- **angular.json**: Add `serviceWorker: true` to production config.
- **package.json**: Add `@angular/service-worker` to dependencies.

This will make any `service-worker` examples work out-of-the-box, when
downloading and running locally from the `.zip` archives.

PR Close 
2019-01-11 11:17:17 -08:00
Brandon Roberts
67435d456c Revert "docs: add testing styles in index.html, remove additional configuration" ()
This reverts commit 621d82a44c9d46f69f3296b302984f5949b8dee8.

PR Close 
2018-10-09 17:04:19 -07:00
Brandon Roberts
fbfce79b93 docs: add testing styles in index.html, remove additional configuration ()
PR Close 
2018-10-09 17:04:19 -07:00
George Kalpakas
1c533c913d build(docs-infra): add support for examples of type elements ()
Examples using `@angular/elements` need to transpile to es2015 for
Custom Elements to work (on browsers that natively support them).

Alternatively, a polyfill would need to be loaded. For now, changing the
transpilation target to es2015 is the simplest solution.

PR Close 
2018-07-20 10:34:47 -07:00
Brandon Roberts
9e2d87f5b8 docs(aio): Update i18n example to Angular V6 ()
PR Close 
2018-05-08 13:56:48 -07:00
Brandon Roberts
2cf6244b1d docs(aio): Upgrade server-side rendering example to Angular V6 ()
PR Close 
2018-05-02 16:51:03 -07:00
Brandon Roberts
2278fe8f0e docs(aio): Upgrade examples to Angular 6 ()
PR Close 
2018-04-17 14:09:02 -07:00
Jesus Rodriguez
1a75934cc0 build(aio): migrate plunker to stackblitz ()
PR Close 
2018-01-23 21:30:27 -08:00
Jesus Rodriguez
c30eff898a docs(aio): update universal for CLI
PR Close 
2017-11-01 15:18:43 -07:00
Jesus Rodriguez
3a8665409d build(aio): add i18n boilerplate type ()
PR Close 
2017-10-31 01:06:25 -04:00
Peter Bacon Darwin
03227e65cf build(aio): example-boilerplate is no longer responsible for yarn install ()
The tooling for boilerplate was also running `yarn install` on the examples'
shared folder. But since this is handled by `ng-packages-installer` this
commit refactors the tools so that the boilerplate no longer does this
anymore.

PR Close 
2017-10-06 11:56:41 -07:00
Peter Bacon Darwin
d1a00459a8 ci(aio): use custom package.json to run with local distributables ()
Closes 

PR Close 
2017-10-06 11:56:41 -07:00
Georgios Kalpakas
7a965dc58f build(aio): add support for using the locally built Angular packages for aio
This commit allows building angular.io against the locally built Angular
packages. It adds two new npm scripts:

- `setup-local`: Same as `setup`, but overwrites the Angular packages for both
  angular.io and the examples boilerplate with the locally built ones.
- `build-local`: Same as `build`, but uses `setup-local` instead of `setup`
  under the hood, thus overwriting installed Angular packages with locally built
  ones.

Fixes 
2017-09-25 14:37:12 -07:00
Jesus Rodriguez
9bbf009dff build(aio): change examples to CLI ()
PR Close 
2017-09-21 17:05:54 -07:00
Chuck Jazdzewski
f96142cd7c build: remove references to tsc-wrapped ()
With this commit `ngc` is used instead of `tsc-wrapped` for
collecting metadata and tsickle rewriting and `tsc-wrapped`
is removed from the repository.

`@angular/tsc-wrapped@5` is now deprecated and is no longer
used, updated, or maintained as part as of Angular 5.x.x.

`@angular/tsc-wrapped@4` is still maintained and required by
Angular 4.x.x and will be maintained as long as 4.x.x is in
LTS.

PR Close 
2017-09-21 13:55:52 -07:00
George Kalpakas
7f2037f0b6 test(aio): fix running docs examples against local builds ()
This commit also updates the version of `@angular/cli` used for docs examples.
The previous (transient) dependency `@ngtools/webpack` was not compatible with
`@angular/compiler-cli@>=5` and was breaking when running against the local
builds (currently at 5.0.0-beta.2). The version of `@ngtools/webpack` used by
the latest `@angular/cli` version is compatible with `@angular/compiler-cli@5`.
2017-08-09 14:21:10 -07:00
Peter Bacon Darwin
c8c2ab012a build(aio): support overriding the Angular packages in examples with locally built ones 2017-07-28 15:28:28 -07:00
Peter Bacon Darwin
ecff8e6c93 build(aio): refactor and test the example-boilerplate tool 2017-07-28 15:28:28 -07:00