diff --git a/README.md b/README.md index 570856e76995..a27ef51a5a0b 100644 --- a/README.md +++ b/README.md @@ -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). diff --git a/docs/documentation/config.md b/docs/documentation/config.md index 7cad423de2c5..0ed74469eb0f 100644 --- a/docs/documentation/config.md +++ b/docs/documentation/config.md @@ -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
@@ -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
diff --git a/packages/@angular/cli/blueprints/service/index.ts b/packages/@angular/cli/blueprints/service/index.ts index e5254aa4f945..23f5cbd34049 100644 --- a/packages/@angular/cli/blueprints/service/index.ts +++ b/packages/@angular/cli/blueprints/service/index.ts @@ -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); diff --git a/packages/@angular/cli/models/webpack-configs/styles.ts b/packages/@angular/cli/models/webpack-configs/styles.ts index 2324dba536f8..c48ff8d121f2 100644 --- a/packages/@angular/cli/models/webpack-configs/styles.ts +++ b/packages/@angular/cli/models/webpack-configs/styles.ts @@ -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 } }] diff --git a/packages/@angular/cli/tasks/eject.ts b/packages/@angular/cli/tasks/eject.ts index 53ed0065c2b1..4bf7eecc98f7 100644 --- a/packages/@angular/cli/tasks/eject.ts +++ b/packages/@angular/cli/tasks/eject.ts @@ -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']); diff --git a/tests/e2e/tests/generate/service/service-dry-run.ts b/tests/e2e/tests/generate/service/service-dry-run.ts new file mode 100644 index 000000000000..b429c3e3cb45 --- /dev/null +++ b/tests/e2e/tests/generate/service/service-dry-run.ts @@ -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()); +}