Skip to content

Update upstream #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Apr 12, 2017
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ npm install --save-dev @angular/cli@latest
npm install
```

If you are updating to 1.0 from a beta or RC version, check out our [1.0 Update Guide](https://github.com/angular/angular-cli/wiki/stories-1.0-update).

You can find more details about changes between versions in [CHANGELOG.md](https://github.com/angular/angular-cli/blob/master/CHANGELOG.md).


Expand Down
2 changes: 2 additions & 0 deletions docs/documentation/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

## Overview
`ng get [key]` Get a value from the configuration.
`[key]` should be in JSON path format. Example: `a[3].foo.bar[2]`.

## Options
<details>
Expand All @@ -21,6 +22,7 @@

## Overview
`ng set [key]=[value]` Set a value in the configuration.
`[key]` should be in JSON path format. Example: `a[3].foo.bar[2]`.

## Options
<details>
Expand Down
7 changes: 7 additions & 0 deletions packages/@angular/cli/blueprints/service/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ export default Blueprint.extend({
`;
this._writeStatusToUI(chalk.yellow, 'WARNING', warningMessage);
} else {
if (options.dryRun) {
this._writeStatusToUI(chalk.yellow,
'update',
path.relative(this.project.root, this.pathToModule));
return;
}

const className = stringUtils.classify(`${options.entity.name}Service`);
const fileName = stringUtils.dasherize(`${options.entity.name}.service`);
const fullGeneratePath = path.join(this.project.root, this.generatePath);
Expand Down
2 changes: 2 additions & 0 deletions packages/@angular/cli/models/webpack-configs/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ export function getStylesConfig(wco: WebpackConfigOptions) {
loader: 'sass-loader',
options: {
sourceMap: cssSourceMap,
// bootstrap-sass requires a minimum precision of 8
precision: 8,
includePaths
}
}]
Expand Down
4 changes: 4 additions & 0 deletions packages/@angular/cli/tasks/eject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ class JsonWebpackSerializer {
serialize(config: any): string {
// config = Object.assign({}, config);
config['plugins'] = this._pluginsReplacer(config['plugins']);
// Routes using PathLocationStrategy break without this.
config['devServer'] = {
'historyApiFallback': true
};
config['resolve'] = this._resolveReplacer(config['resolve']);
config['resolveLoader'] = this._resolveReplacer(config['resolveLoader']);
config['entry'] = this._entryReplacer(config['entry']);
Expand Down
9 changes: 9 additions & 0 deletions tests/e2e/tests/generate/service/service-dry-run.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import {join} from 'path';
import {ng} from '../../../utils/process';
import {expectGitToBeClean} from '../../../utils/git';


export default function() {
return ng('generate', 'service', 'test-service', '--module', 'app.module.ts', '--dry-run')
.then(() => expectGitToBeClean());
}