123 Commits

Author SHA1 Message Date
Hans
ae47b46563 refactor: move all CLI-specific exceptions to different options (#7981)
We made too many shortcuts for passing data in and custom schematics could not
work properly.

This is temporary as we will likely move some more logic into schematics tooling
to be able to pass only the raw args and the CLI config, but for now this is
enough to unblock AngularMix.
2017-10-09 22:28:29 -07:00
Aditya Parab
3bbf175bab fix(@angular/cli): do not run e2e task if build fails
when ng e2e --serve=true is run and the build is not successful e2e task
should not be run

previously the e2e task was run even if build was a failure which will
obviously result in failure of test cases
now if errors are detected in build the e2e task will not be run
update docs as well to reflect this behaviour

Closes #7567
2017-10-06 09:59:47 -07:00
Filipe Silva
08b284ec62 feat(@angular/cli): use eval-source-map for serve on dev targets 2017-10-05 13:15:30 -04:00
Hans Larsen
aa02086d02 feat(@angular/cli): add a bundle dependencies flag
This flag allows people who know what theyre doing to bundle the
server build together with all dependencies. It should only be
used when the whole rendering process is part of the main.ts
or one of its dependencies.

Fixes #7903.
2017-10-05 09:56:11 -07:00
vsavkin
b6dfa8d52c feat(@angular/cli): make appRoot customizable 2017-10-04 14:33:43 -04:00
Mike Brocchi
60509ae54c fix(@angular/cli): Correct selecting custom schematic collection 2017-10-03 09:38:43 -04:00
Filipe Silva
d430abe9e3 feat(@angular/cli): always use new compiler with Angular 5 2017-10-02 12:52:02 -04:00
Mike Brocchi
116e294317 fix(@angular/cli): Refactor skip git flag into schematics
related to angular/devkit#167
2017-09-28 15:26:29 -07:00
Charles Lyding
8f73714a3a feat(@angular/cli): support subresource integrity validation 2017-09-26 16:27:30 +01:00
Charles Lyding
baf20296ab refactor(@angular/cli): remove intermediate init command 2017-09-25 12:04:46 +01:00
Hans Larsen
ce218ec39c fix(@angular/cli): fix an issue with schematics
The issue here is that the sourceDir string could be anywhere in the
path. We only care about it if its at the start.
2017-09-20 09:58:49 -04:00
Hans Larsen
725e0d03d4 fix(@angular/cli): add appRoot to generate
This depends on https://github.com/angular/devkit/pull/149

Fixes #7695
2017-09-20 09:58:49 -04:00
Ahsan Ayaz
fa42645861 fix(@angular/cli): Generating component considers default style extension for project now 2017-09-19 21:21:50 -04:00
Hans Larsen
2b982d2cba refactor: fix comments to the PR 2017-09-13 16:21:16 -07:00
Filipe Silva
939cd6c02d feat(@ngtools/webpack): add AngularCompilerPlugin 2017-09-13 16:21:16 -07:00
Filipe Silva
b0fd35ee37 feat(@angular/cli): add --preserve-symlinks to ng test
Fix #7081
2017-09-13 12:32:23 -07:00
vsavkin
6c6584d133 fix(@angular/cli): fix new to work with custom collections 2017-09-13 10:40:41 -07:00
Mike Brocchi
1a89c944f2 fix(@angular/cli): Make prefix work when using aliases
fixes #7522
2017-09-13 10:26:07 -07:00
Filipe Silva
022ed2ce71 fix(@angular/cli): verify Angular/TS version combos 2017-09-07 16:32:41 +01:00
Mike Brocchi
1652aa3fdc fix(@angular/cli): Use the app default prefix when generating
fixes #7522
2017-09-06 10:08:34 +01:00
Anisetus Elly Efendi
77510649f6 fix(@angular/cli): ng lint option format not work properly if using alias 2017-08-23 14:25:26 -07:00
Tembong Fonji
9ee78abd28 feat(@angular/cli): show typescript version on ng version (#7372) 2017-08-20 11:45:48 -07:00
Olivier Combe
e746369ca4 feat(@angular/cli): add AOT parameter missingTranslation
This adds the new parameter `missingTranslation` for AoT that was added in angular/angular/pull/15987 and that lets you define the MissingTranslationStrategy
2017-08-18 12:15:55 -07:00
Charles Lyding
2c6dde1941 feat(@angular/cli): add option to set dev server's base serve path 2017-08-17 14:45:45 -04:00
Mike Brocchi
128187e4c1 feat(@angular/cli): Update generate & new to use schematics
This feature is related to #6593
2017-08-16 18:24:43 -04:00
kevinphelps
c873e0358d fix(@angular/cli): use correct property names for build config defaults 2017-08-04 14:42:42 -07:00
Carlo Dapor
80275e50cb feat(@angular/cli): Implement request 7141 - Short list of cli commands
When calling  ng help -s / --short  one gets a shorter output; basically only ng + command, followed by the command's description.

No breaking change, as it introduces a new flag.
2017-08-03 18:07:35 +01:00
Filipe Silva
92902c6094 fix(@angular/cli): remove -bo alias for --build-optimizer
/cc @StephenFluin
2017-08-02 21:25:37 +01:00
Filipe Silva
7b9fc285e3 feat(@angular/cli): support TypeScript 2.4
This PR doesn't change new projects to use 2.4 since I have seen some reports of possible problems in `@angular/*`.

Instead, it:
- removes the dependency restrictions on <2.3
- bumps related dependencies to the minimum that supports 2.4 (`rxjs@^5.4.2`, `ts-node@~3.2.0`)
- builds the CLI itself using 2.4

So if you want to install ts 2.4 in your new project, the CLI itself won't stop you.

Fix #6827
2017-07-21 15:55:43 -04:00
jnizet
6ca6a5e92b fix(@angular/cli): fix doc command to work with new angular.io
- change the URL for the API search
- use google search when --search option is true, since angular.io doesn't have a search page anymore
- improve the help and doc of the doc command
2017-07-19 15:57:15 -04:00
Filipe Silva
826c634090 feat(@angular/cli): add flag to control chunk naming
Followup to #6881

Allow controlling chunk naming via the `--named-chunks` flag, which can be set on `.angular-cli.json` as well.

Defaults to true in development, false in production.
2017-07-19 13:53:07 -04:00
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
5e8aadcb51 fix(@angular/cli): use build defaults in test
These defaults were added to build/serve/e2e but not to test.
2017-07-19 11:03:55 -04:00
Kevin Phelps
26e94339ba feat(@angular/cli): make the common chunk optional
- Add a "--no-common-chunk" build option for disabling the common async chunk.
- The existing behavior is maintained by default.

closes #7021
2017-07-19 10:13:24 -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
28e4114785 feat(@angular/cli): followup changes to circular dependency detection
Flag is now positive instead of negative and shorter, and can now be set on commands as well (`--show-circular-dependencies`).

Dependency was also added to eject as per https://github.com/angular/angular-cli/pull/6813#issuecomment-311567074.
2017-06-29 11:18:39 -07:00
Yaroslav Admin
70713bf076 feat(@angular/cli): add flag to specify environment for ng test command 2017-06-29 14:28:11 +01:00
Giora Guttsait
e87598e5db docs(@angular/cli): update documentation for ng new
* for several options that are saved in .angular-cli.json, I've added an explanation of what setting in the json file controls that options.
* added an explanation about what --dry-run will output.
* added possible values for --style option
* added respective documentation in the command
* also added less, sass and styl(stylus) as possible style extensions

The motivation for this change is that sometimes people would want to change some of the settings set by the cli durig ng new, that they might have not known or cared about, for example, prefix.
2017-06-12 09:52:45 -04:00
Mike Brocchi
a7668e0b0c feat(@angular/cli): add barebones option to ng new
This feature allows users to specify `--barebones` (`-b`) to create a no-frills app.
2017-06-07 12:33:48 -07:00
Sumit Arora
e72693a948 feat(@angular/cli): remove deduped licenses 2017-06-02 19:19:44 +01:00
Jesse Palmer
d1cac3255b feat(@angular/cli): add n as new alias (#6494) 2017-06-01 12:01:28 +01:00
Charles Lyding
af3e6b22f4 feat(@angular/cli): add option to preserve symlinks for module resolution 2017-06-01 11:47:19 +01:00
Filipe Silva
91cbe3375f refactor(@angular/cli): use this.project instead of cliProject 2017-05-24 13:39:30 -07:00
Sumit Arora
d954ed1eab fix(@angular/cli): only values in enum should be allowed to update 2017-05-24 15:54:35 -04:00
Ricardo Varanda
dbfa851709 fix(@angular/cli): fix leading digit in file names from generate command 2017-05-24 15:35:46 -04:00
Sumit Arora
61cf790057 fix(@angular/cli): fix package name fetching from package.json 2017-05-24 15:22:32 -04: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
Charles Lyding
a3bf5291e7 feat(@angular/cli): add option to use lint to adjust generated files 2017-05-09 19:04:11 +01:00
Charles Lyding
5cf395c948 refactor(@angular/cli): simplify blueprint generation command 2017-05-09 19:04:11 +01:00