363 Commits

Author SHA1 Message Date
Mike Brocchi
f735760a34 fix(@angular/cli): Prevent re-reading config file if project & global are the same
Addresses #4207
2017-07-14 14:03:40 -07:00
Filipe Silva
6ad27c5174 fix(@angular/cli): always ignore node_modules for lint
Fix #6626
2017-07-14 14:02:45 -07:00
Filipe Silva
d4b64de427 build: pin zone.js
`zone.js@0.8.13` has some bugs that break our CI runs. These are being tracked in https://github.com/angular/zone.js/issues/832.

Until a these are fixed and a new versions is released, we should pin to `zone.js@0.8.12`. Another PR should go up then and unpin to `zone.js@^0.8.14`.
2017-07-13 16:25:52 -07:00
Hans Larsen
634a04190d
release: 1.3.0-beta.1 2017-07-12 11:44:46 -07:00
Filipe Silva
fe85750cb7 feat(@angular/cli): add scope hoisting via webpack 3
This should result in significant bundle size reduction. For best results, build for production with `--vendor-chunk=false`.

See https://medium.com/webpack/webpack-3-official-release-15fd2dd8f07b for details.
2017-07-10 16:59:08 -07:00
Filipe Silva
fd52246dfc feat(@angular/cli): allow chunk names for imports
Followup to #6881

Also name chunks created via `import()` or `System.import()`, and strip `.ngfactory` from the chunk name.
2017-07-10 10:33:57 -07: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
Filipe Silva
2780c3d7ab fix(@angular/cli): use inline sourcemaps in test
Fix #6737
2017-07-05 18:47:51 -07:00
Alexandr Marchenko
b0576d6d05 fix(@angular/cli): check package manager existance before installing packages 2017-07-05 16:47:47 -07:00
Filipe Silva
ac2fec47eb fix(@angular/cli): don't set baseUrl in editor tsconfig
Fix https://github.com/angular/angular-cli/issues/5875
2017-07-05 16:11:18 -07:00
Filipe Silva
5a0e80ffd3 feat(@angular/cli): name lazy chunks
Before:
```
$ ng build --no-progress
Hash: ff03df269349b817eef4
Time: 11202ms
chunk    {0} 0.chunk.js, 0.chunk.js.map 1.61 kB {1} {3} [rendered]
chunk    {1} 1.chunk.js, 1.chunk.js.map 1.46 kB {0} {3} [rendered]
chunk    {2} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 160 kB {6} [initial] [rendered]
chunk    {3} main.bundle.js, main.bundle.js.map (main) 6.38 kB {5} [initial] [rendered]
chunk    {4} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {6} [initial] [rendered]
chunk    {5} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.16 MB [initial] [rendered]
chunk    {6} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
```

After:
```
$ ng build --no-progress
Hash: 2bc12a89f40f3b4818b5
Time: 9613ms
chunk {feature.module} feature.module.chunk.js, feature.module.chunk.js.map 1.46 kB {lazy.module} {main} [rendered]
chunk {inline} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]
chunk {lazy.module} lazy.module.chunk.js, lazy.module.chunk.js.map 1.61 kB {feature.module} {main} [rendered]
chunk {main} main.bundle.js, main.bundle.js.map (main) 6.38 kB {vendor} [initial] [rendered]
chunk {polyfills} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 160 kB {inline} [initial] [rendered]
chunk {styles} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {inline} [initial] [rendered]
chunk {vendor} vendor.bundle.js, vendor.bundle.js.map (vendor) 2.16 MB [initial] [rendered]
```

Fix #6700
2017-07-05 14:50:52 -07:00
Johannes Schramm
1c6179af85 fix(@angular/cli): adjust blueprint tslint.json rule semicolon 2017-07-05 14:27:24 -07:00
Johannes Schramm
f25ce49734 fix(@angular/cli): adjust blueprint tslint.json rule member-ordering 2017-07-05 14:27:24 -07:00
Filipe Silva
55b9d5ca0c fix(@angular/cli): use a single exclamation mark for blueprint
...then shalt thou count to one, no more, no less. One shall be the number thou shalt count, and the number of the counting shall be one. Two shalt thou not count, neither count thou zeroth, excepting that thou then proceed to one. Three is right out.
2017-07-05 12:58:14 -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
Sumit Arora
64e6b94908
fix(@angular/cli): fix directory issue
Closes #6444
2017-06-30 10:32:08 -07:00
Filipe Silva
304d4c87ef
release: 1.3.0-beta.0 2017-06-29 13:57:43 -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
Charles Lyding
3dbd3ad88e refactor(@angular/cli): remove unneeded rimraf dependency 2017-06-29 15:49:59 +01:00
Yaroslav Admin
70713bf076 feat(@angular/cli): add flag to specify environment for ng test command 2017-06-29 14:28:11 +01:00
mgechev
8bad46eef2 fix(@angular/cli): remove slash in the end of open tag
HTML5 void elements should not have a slash.

https://stackoverflow.com/questions/3558119/are-non-void-self-closing-tags-valid-in-html5
2017-06-28 15:01:44 +01:00
Daniel Rönnkvist
0c6a9c5beb fix(@angular/cli): Changed init order to make sure all files gets committed
With the update of npm 5 and the introduction of package-lock.json all files weren't
committed into the first commit.
2017-06-28 14:49:05 +01:00
Daniel Sogl
7e00859e12 feat(@angular/cli): bump blueprint dependencies 2017-06-28 14:41:02 +01:00
Charles Lyding
9469333380 refactor(@angular/cli): remove unneeded debug package dependency 2017-06-28 14:28:26 +01:00
Charles Lyding
07a3d52b51 refactor(@angular/cli): simplify ember-cli promise usage 2017-06-28 14:28:26 +01:00
Charles Lyding
89dd9709ea refactor(@angular/cli): partial upgrade to ember-cli 2.13.2 2017-06-28 14:28:26 +01:00
Reto Lehmann
0e05e5168b fix(@angular/cli): Fixed e2e task to respect --publicHost setting as baseUrl for protractor (#6266)
https://github.com/angular/angular-cli/pull/6173 added two new settings
to the serve task. The --publicHost setting is not respected as baseUrl
for protractor in the e2e-task.

With this fix, if --publicHost is set, it will be used as baseUrl for protrator.
2017-06-27 16:46:44 +01:00
Narain Sagar
aabad932d6 feat(@angular/cli): update e2e blueprint files 2017-06-27 16:34:29 +01:00
cexbrayat
054b203a92 fix(@angular/cli): bump jasmine and add jasminewd2 types
This bumps jasmine types to 2.5.53.
The version was previously pinned down to 2.5.45, because more recent versions weren't playing nice with Protractor
and lead to errors like https://github.com/angular/protractor/issues/4176

The proper fix appears to be the one mentioned in the Protractor issue: add `@types/jasminewd2` typings,
and add these typings to the tsconfig for e2e tests.

[jasminewd](https://github.com/angular/jasminewd) is the adapter used by Protractor to handle the async part.
2017-06-27 16:31:42 +01:00
Filipe Silva
1f3738b19f feat(@angular/cli): add circular dependency detection
Circular dependencies, like `app.module.ts` importing `app.component.ts` which in turn imports `app.module.ts`, now display a warning during builds:

```
kamik@T460p MINGW64 /d/sandbox/master-project (master)
$ ng build
Hash: 3516b252f4e32d6c5bb8
Time: 8693ms
chunk    {0} polyfills.bundle.js, polyfills.bundle.js.map (polyfills) 160 kB {4} [initial] [rendered]
chunk    {1} main.bundle.js, main.bundle.js.map (main) 5.95 kB {3} [initial] [rendered]
chunk    {2} styles.bundle.js, styles.bundle.js.map (styles) 10.5 kB {4} [initial] [rendered]
chunk    {3} vendor.bundle.js, vendor.bundle.js.map (vendor) 1.88 MB [initial] [rendered]
chunk    {4} inline.bundle.js, inline.bundle.js.map (inline) 0 bytes [entry] [rendered]

WARNING in Circular dependency detected:
src\app\app.module.ts -> src\app\app.component.ts -> src\app\app.module.ts

WARNING in Circular dependency detected:
src\app\app.component.ts -> src\app\app.module.ts -> src\app\app.component.ts
```

It is important to detect and eliminate circular dependencies because leaving them in might lead to `Maximum call stack size exceeded` errors, or imports being `undefined` at runtime.

To remove these warnings from your project you can factor out the circular dependency into a separate module.

For instance, if module A imports `foo` from module B, and module B imports `bar` from module A, it is enough to extract `foo` into module C.

You can turn off these warnings by running ng set apps.0.hideCircularDependencyWarnings=true. This will add the "hideCircularDependencyWarnings": true value to your .angular-cli.json and disable the warnings.

Fix #6309
Fix #6739
2017-06-27 16:30:30 +01:00
Stephen Fluin
c9cbf59a53 fix(@angular/cli): Improve comment in sample html 2017-06-27 16:24:48 +01:00
jiverson
a8e4beba54 fix(@angular/cli): glob copy plugin config 2017-06-27 16:10:37 +01:00
Charles Lyding
143a0748b5 refactor(@angular/cli): cleanup global config path discovery 2017-06-27 14:35:34 +01:00
Mike Brocchi
9e8a4427de
release: 1.2.0-rc.1 2017-06-22 08:40:06 -07:00
Alex Rickabaugh
220e59dbf4 fix(@angular/cli): check for existing SW manifest should look in project dir
A previous change broke the logic which brings an application ngsw-manifest.json into the Webpack build for merging with the auto-generated configuration. It caused the GlobCopyWebpackPlugin to look in the wrong directory for the existing manifest. This change sets the working directory for the copy plugin explicitly.

Fixes #6654.
2017-06-21 14:05:40 -07:00
Bram Borggreve
b989e80626 feat(@angular/cli): allow disabling warning when --hmr flag is enabled 2017-06-19 15:29:54 -04:00
jiverson
477a8e50f6 fix(@angular/cli): package sort 2017-06-16 17:05:22 -04:00
Charles Lyding
bd0dac11aa fix(@angular/cli): correct sourcemap source paths 2017-06-15 13:50:35 -04:00
Prakhar Srivastav
ca9414bd93 fix(@angular/cli): URL for tour of heroes tutorial (#6672)
Existing URL that is generated in the scaffold gives a 404. Updating this to the correct version.
2017-06-15 10:49:35 -07:00
Freek Wielstra
b8acc48fd3 fix(@angular/cli): Make generated inline template conform to test case
The generated app component spec checks for the string "Welcome to {{title}}!!", which is only output by the generated `app.component.htm`l file, not the generated inline template in `app.component.ts` when the `--inline-template` option is passed to the `ng new` command. This causes a test failure when generating a new app with `--inline-template`.
2017-06-15 13:36:08 -04:00
Charles Lyding
10ec556813 fix(@angular/cli): provide file path with config parse errors 2017-06-15 13:29:01 -04:00
Charles Lyding
ebb56d7485 refactor(@angular/cli): use UI method to show component generation warning 2017-06-15 13:27:08 -04: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
Charles Lyding
f75b5a7151 feat(@angular/cli): improve common bundling performance 2017-06-12 09:48:49 -04:00
laco0416
692b378770 feat(@angular/cli): add baseHref property to appConfig 2017-06-12 09:44:44 -04:00
Filipe Silva
01cbf65728
release: 1.1.1 2017-06-07 14:04:31 -07: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
2be0bf2d53 fix(@angular/cli): fix delete path check 2017-06-07 11:22:25 -07:00
Tatsuyuki Ishi
75311c2a45 feat(@angular/cli): add support for minifying HTML
Close #1861
2017-06-07 18:49:09 +01:00
Charles Lyding
d437afbfae fix(@angular/cli): allow public host option to accept only hostname 2017-06-07 18:44:34 +01:00