Skip to content
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

build(aio): align stackblitz files with Angular CLI V6 #23521

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion aio/content/examples/cli-quickstart/zipper.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"!**/*.d.ts",
"!**/*.js",
"!**/*.[0-9].*",
".angular-cli.json",
"angular.json",
"protractor.conf.js"
]
}
2 changes: 1 addition & 1 deletion aio/content/guide/ajs-quick-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,7 @@ also encapsulate a style sheet within a specific component.
### Styles configuration
<code-example hideCopy path="ajs-quick-reference/.angular-cli.1.json" region="styles" linenums="false"></code-example>

With the Angular CLI, you can configure your global styles in the `.angular-cli.json` file.
With the Angular CLI, you can configure your global styles in the `angular.json` file.
You can rename the extension to `.scss` to use sass.

### StyleUrls
Expand Down
2 changes: 1 addition & 1 deletion aio/content/guide/component-styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ In this case, the URL is relative to the CSS file into which you're importing.

### External and global style files

When building with the CLI, you must configure the `.angular-cli.json` to include _all external assets_, including external style files.
When building with the CLI, you must configure the `angular.json` to include _all external assets_, including external style files.

Register **global** style files in the `styles` section which, by default, is pre-configured with the global `styles.css` file.

Expand Down
2 changes: 1 addition & 1 deletion aio/content/guide/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ It serves build artifacts from memory instead for a faster development experienc
<div class="l-sub-section">

The output folder is `dist/` by default.
To output to a different folder, change the `outDir` in `.angular-cli.json`.
To output to a different folder, change the `outputPath` in `angular.json`.

</div>

Expand Down
6 changes: 3 additions & 3 deletions aio/content/guide/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@ The tests run again, the browser refreshes, and the new test results appear.

The CLI takes care of Jasmine and karma configuration for you.

You can fine-tune many options by editing the `karma.conf.js` file in the project root folder and
the `test.ts` file in the `src/` folder.
You can fine-tune many options by editing the `karma.conf.js` and
the `test.ts` files in the `src/` folder.

The `karma.conf.js` file is a partial karma configuration file.
The CLI constructs the full runtime configuration in memory,based on application structure specified in the `.angular-cli.json` file, supplemented by `karma.conf.js`.
The CLI constructs the full runtime configuration in memory,based on application structure specified in the `angular.json` file, supplemented by `karma.conf.js`.

Search the web for more details about Jasmine and karma configuration.

Expand Down
1 change: 1 addition & 0 deletions aio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"ignore": "^3.3.3",
"image-size": "^0.5.1",
"jasmine-core": "^2.8.0",
"jasmine-marbles": "^0.3.1",
"jasmine-spec-reporter": "^4.1.0",
"jasmine-ts": "^0.2.1",
"jsdom": "^9.12.0",
Expand Down
2 changes: 1 addition & 1 deletion aio/tools/example-zipper/exampleZipper.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class ExampleZipper {
let alwaysIncludes = [
'bs-config.json',
'e2e/protractor.conf.js',
'.angular-cli.json',
'angular.json',
'.editorconfig',
'.gitignore',
'tslint.json',
Expand Down
33 changes: 18 additions & 15 deletions aio/tools/examples/shared/boilerplate/UPDATING_CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,35 @@ Now you have a fresh application to get our new boilerplate files.

From `dummy` you can replace the following files into `aio/tools/examples/shared/boilerplate/cli`:

* tslint.json
* tsconfig.json
* package.json
* protractor.conf.js
* karma.conf.js
* .editorconfig
* angular-cli.json
* src/tsconfig.spec.json
* src/test.ts
* src/polyfills.js
* src/typings.d.ts
* angular.json
* package.json
* tsconfig.json
* tslint.json
* e2e/src/app.po.ts
* e2e/protractor.conf.js
* e2e/tsconfig.e2e.json
* src/environments/environment.prod.ts
* src/environments/environment.ts
* src/browserslist
* src/favicon.ico
* src/karma.conf.js
* src/polyfills.js
* src/styles.css
* src/test.ts
* src/tsconfig.app.json
* src/tsconfig.spec.json
* src/tslint.json
* src/typings.d.ts

### .angular-cli.json
### angular.json

Update the `project > name` to `angular.io-example`.

### package.json

Update the `name` to `angular.io-example`.

### src/polyfills.ts

Uncomment the `import 'web-animations-js';` line to enable `web-animations-js` package.

### src/tsconfig.app.json

This file is small enough and there are a few new excludes, update by hand.
60 changes: 0 additions & 60 deletions aio/tools/examples/shared/boilerplate/cli/.angular-cli.json

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// The file contents for the current environment will overwrite these during build.
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
// The list of which env maps to which file can be found in `.angular-cli.json`.
// This file can be replaced during build by using the `fileReplacements` array.
// `ng build ---prod` replaces `environment.ts` with `environment.prod.ts`.
// The list of file replacements can be found in `angular.json`.

export const environment = {
production: false
Expand Down
2 changes: 1 addition & 1 deletion aio/tools/stackblitz-builder/builder.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ class StackblitzBuilder {
}

var defaultIncludes = ['**/*.ts', '**/*.js', '**/*.css', '**/*.html', '**/*.md', '**/*.json', '**/*.png'];
var boilerplateIncludes = ['src/environments/*.*', '.angular-cli.json', 'src/polyfills.ts'];
var boilerplateIncludes = ['src/environments/*.*', 'angular.json', 'src/polyfills.ts'];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But why does the file exist in the first place? Shouldn't it be removed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does stackblitz use this file for anything?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICT, it only uses it to include it in the exported zip.
(BTW, I just realized the zips exported by StackBlitz are broken (e.g. wrong layout) for both old and new projects.)

if (config.files) {
if (config.files.length > 0) {
if (config.files[0].substr(0, 1) == '!') {
Expand Down
6 changes: 6 additions & 0 deletions aio/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5846,6 +5846,12 @@ jasmine-core@^2.8.0, jasmine-core@~2.8.0:
version "2.8.0"
resolved "https://registry.yarnpkg.com/jasmine-core/-/jasmine-core-2.8.0.tgz#bcc979ae1f9fd05701e45e52e65d3a5d63f1a24e"

jasmine-marbles@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/jasmine-marbles/-/jasmine-marbles-0.3.1.tgz#ef65edecb41b8dd62fc6bda40448222042e32043"
dependencies:
lodash "^4.5.0"

jasmine-spec-reporter@^4.1.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/jasmine-spec-reporter/-/jasmine-spec-reporter-4.2.1.tgz#1d632aec0341670ad324f92ba84b4b32b35e9e22"
Expand Down