This change should reduce the amount of problems on npm installs.
It makes the `node-sass` dependency optional, and so install will not fail when it cannot be installed.
For projects that do not use sass, there is no side-effect of an failed node-sass install.
For projects that do use node-sass and the install failed, they should see the following self-explanatory error message:
```
ERROR in ./src/app/app.component.scss
Module build failed: Error: Missing binding D:\sandbox\master-project\node_modules\node-sass\vendor\win32-x64-51\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 7.x
Found bindings for the following environments:
This usually happens because your environment has changed since running `npm install`.
Run `npm rebuild node-sass` to build the binding for your current environment.
at module.exports (D:\sandbox\master-project\node_modules\node-sass\lib\binding.js:15:13)
at Object.<anonymous> (D:\sandbox\master-project\node_modules\node-sass\lib\index.js:14:35)
```
Fix#4429
For travis runs on branches, local master never exists there's no branch
tracking origin/master.
This causes `git fetch origin master` to fetch into `FETCH_HEAD` instead
of master.
This PR will explicitely fetch origin master into local master, and use
that for the log comparison.
Fixing component css in #4667 uncovered errors in CSS url processing.
This PR correctly composes absolute urls when using `--base-href` and/or `--deploy-url`.
It also fixes asset output on `--aot` mode.
Fix#4778Fix#4782Fix#4806
* test: add license test
* only check prod dependencies
* remove findup dep
* also check dev deps
* add map-stream to ignore list
* remove license-checker
* add comment
* use logger
* fix lint errors
Adds the flag 'serviceWorker' to angular-cli.json that enables support for @angular/service-worker.
When this flag is true, production builds will be set up with a service worker. A ngsw-manifest.json file
will be generated (or augmented) in the dist/ root, and the service worker script will be copied there.
A short script will be added to index.html to register the service worker.
@angular/service-worker is a dependency of @angular/cli, but not of generated projects. It is desirable
for users to be able to update the version of @angular/service-worker used in their apps independently
of the CLI version. Thus, the CLI will error if serviceWorker=true but @angular/service-worker is not
installed in the application's node_modules, as it pulls all the service worker scripts from there.
If the flag is false the effect on the CLI is minimal - the webpack plugins associated with the SW are
not even require()'d.
Closes#4544
This is the same code we used before, but:
1. its in a separate package,
2. it also support new serialization to .d.ts,
3. OneOf is now supported entirely (instead of the previous hack).
Also, removed the schema.d.ts file and generate it before building the package. It is not git ignored and changing it will not work (it will be overwritten).
Also adding a new package, webpack, which is a plugin and loader for
webpack that adds support for AoT.
It is behind a `--aot` flag in the CLI that is supported by build and
serve.
Moving Angular-CLI into `packages/` and building the angular-cli.
The published packages will now have JavaScript only (with their d.ts), instead of being a mix of TypeScript and JavaScript, and it won't have the hacks of having a custom require extension to load the TypeScript.
Our development flow will be more streamlined, tools are going to be better (no more undefined symbols that are actually defined), and the npm packages will boot up way faster (since there's no more compilation during runtime).
Locally nothing changes, use `npm link` and run your local `ng`. Using the `npm` releases though it should be all javascript from the release.
The E2E tests also now uses the `dist` folder output to install in the new E2E app, making sure the process works for an app published to npm.
Note: Even though we're following the lerna structure, we won't be using their tool anytime soon.