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

Also cleans up legacy references to `.angular-cli.json`

PR Close #23521
This commit is contained in:
Brandon Roberts
2018-04-30 07:23:24 -05:00
committed by Igor Minar
parent f6002c1702
commit 22eb8e26fc
12 changed files with 37 additions and 88 deletions

View File

@ -86,7 +86,7 @@ class ExampleZipper {
let alwaysIncludes = [
'bs-config.json',
'e2e/protractor.conf.js',
'.angular-cli.json',
'angular.json',
'.editorconfig',
'.gitignore',
'tslint.json',

View File

@ -22,21 +22,28 @@ 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`.
@ -44,10 +51,6 @@ Update the `project > name` to `angular.io-example`.
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.

View File

@ -1,60 +0,0 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"project": {
"name": "angular.io-example"
},
"apps": [
{
"root": "src",
"outDir": "dist",
"assets": [
"assets",
"favicon.ico"
],
"index": "index.html",
"main": "main.ts",
"polyfills": "polyfills.ts",
"test": "test.ts",
"tsconfig": "tsconfig.app.json",
"testTsconfig": "tsconfig.spec.json",
"prefix": "app",
"styles": [
"styles.css"
],
"scripts": [],
"environmentSource": "environments/environment.ts",
"environments": {
"dev": "environments/environment.ts",
"prod": "environments/environment.prod.ts"
}
}
],
"e2e": {
"protractor": {
"config": "./protractor.conf.js"
}
},
"lint": [
{
"project": "src/tsconfig.app.json",
"exclude": "**/node_modules/**"
},
{
"project": "src/tsconfig.spec.json",
"exclude": "**/node_modules/**"
},
{
"project": "e2e/tsconfig.e2e.json",
"exclude": "**/node_modules/**"
}
],
"test": {
"karma": {
"config": "./karma.conf.js"
}
},
"defaults": {
"styleExt": "css",
"component": {}
}
}

View File

@ -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

View File

@ -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'];
if (config.files) {
if (config.files.length > 0) {
if (config.files[0].substr(0, 1) == '!') {