16 Commits

Author SHA1 Message Date
Filipe Silva
9ec5b4ed66 feat(@angular/cli): add build-optimizer support
Adds the new flag `--build-optimizer` (`--bo`), usable only with `--aot` (or `--prod` since it auto enables `--aot`).

This feature is experimental, and may not work correctly on your project. Should it work, total bundle size should go down. Savings are heavily dependent on the project.

See https://github.com/angular/devkit/tree/master/packages/angular_devkit/build_optimizer for details about all the optimizations applied.

Usage: `ng build --prod --build-optimizer`. Disabling the vendor chunk has been shown to improve total savings, and is done automatically when `--bo` is specified unless `--vendor-chunk` has a value.

Please let us know if using `--build-optimizer` breaks your project so we can improve it further. Repos are very welcome.
2017-07-19 12:27:23 -04:00
Filipe Silva
7f280499cd feat(@angular/cli): add build defaults to config
Adds following defaults to `.angular-cli.json` under `defaults`: `sourcemaps`, `baseHref`, `progress`, `poll`, `deleteOutputPath`, `preserveSymlinks`, `showCircularDependencies`.

They can be set via `ng set defaults.build.KEY = VALUE`.

Also removes `apps.0.showCircularDependencies`. This is not a breaking chance since it was only added in 1.3.0-beta.0.

Followup to https://github.com/angular/angular-cli/pull/6884#discussion_r125533830.
2017-07-06 15:03:19 -07:00
James Ayvaz
36e4d7b4bb feat(@angular/cli): read proxyConfig from angular-cli.json
easy proxy config by reading default from angular-cli.json (#6240)
2017-07-05 11:45:52 -07:00
Filipe Silva
a54a991b2f feat(@angular/cli): add host check flags to ng serve
Two new flags are added to `ng serve`:
- `--public-host` (aliased by `--live-reload-client): Specify the URL that the browser client will use.
- `--disable-host-check`: Don't verify connected clients are part of allowed hosts.

Setting `--disable-host-check` will output a warning:
```
WARNING Running a server with --disable-host-check is a security risk. See https://medium.com/webpack/webpack-dev-server-middleware-security-issues-1489d950874a for more information.
```

See #6070 for more context about this change.

Fix #6070
2017-05-09 21:04:58 +01:00
Hans Larsen
b4594bac33
fix(@angular/cli): add more description 2017-02-22 17:20:17 -08:00
Sumit Arora
7ebe4f0d4e fix(@angular/cli): adding help descriptions 2017-02-22 18:43:34 -05:00
Sumit Arora
ade2236a9b feat(@angular/cli): adding the --app command option (#4754) 2017-02-22 14:19:29 -08:00
Lenny
b4985498c9 feat(@angular/cli): allow setting ssl certificate in angular-cli.json (#4730)
Currently users must use the --ssl, -ssl-cert, -ssl-key flags to run the
server using an ssl certificate. This update allows users to set
those options in default.serve so they can just run `ng serve` without any
flags.
2017-02-22 14:01:29 -08:00
Charles Lyding
d79fd000c1 refactor(@angular/cli): use check port utility function in serve command
Close #4898
2017-02-22 11:54:57 +00:00
Filipe Silva
d1e13ace0b build: use noUnusedParameters, noUnusedLocals (#4882) 2017-02-21 10:53:34 -08:00
Filipe Silva
a4b43a59e4 fix(serve): allow relevant live-reload options to function (#4744)
This provides implementations for the following serve command options:

live-reload [boolean; default: true] -- flag to control the browser live reload capability
live-reload-client [URL; default: ssl/host/port command options] -- specify the URL that the live reload browser client will use

Closes #3361
2017-02-21 09:01:40 +00:00
Filipe Silva
d2bef98bb9 feat(@angular/cli): ng e2e defaults to random port (#4753)
BREAKING CHANGE: `ng e2e` will use a random port for serving by default
instead of using 4200.
2017-02-17 19:53:22 +00:00
Filipe Silva
9d29cbca0f feat(@angular/cli): add watch flag to serve/e2e (#4749)
This is useful when you don't want the server to rebuild in the middle of something.

A good example is when running e2e tests. Especially on larger suites, one would prefer to continue working while the build is tested without compromising tests.

This will break tests on #4744. They should be adjusted to add the `--watch` flag since they depend on the live reload behaviour during `ng e2e`.
2017-02-16 17:17:15 -08:00
Filipe Silva
8d2d93a7a2 feat(e2e): use protractor api (#4527)
Uses existing Protractor API to run it directly instead of using `npm run
e2e`.

Also adds support for the following flags: `--serve`, `--config`,
`--specs`, `--element-explorer`, `--webdriver-update`.

Fix #4256
Fix #4478

BREAKING CHANGE: `ng e2e` no longer needs `ng serve` to be running.
2017-02-09 15:14:29 -08:00
Filipe Silva
b8328dca55 refactor(commands): turn .run commands into tasks (#4251) 2017-02-08 11:49:05 +00:00
Hans
601f9b38f8 feat(@angular/cli): move angular-cli to @angular/cli (#4328)
This release is otherwise identical to beta.28.
2017-02-01 18:19:50 -08:00