Revert "docs: add testing styles in index.html, remove additional configuration" (#25892)

This reverts commit 621d82a44c9d46f69f3296b302984f5949b8dee8.

PR Close #25892
This commit is contained in:
Brandon Roberts 2018-10-05 14:30:35 -05:00 committed by Jason Aden
parent fbfce79b93
commit 67435d456c
10 changed files with 149 additions and 25 deletions

View File

@ -0,0 +1,3 @@
{
"projectType": "testing"
}

View File

@ -1,11 +1,4 @@
<!-- Add the app test styles-->
<!DOCTYPE html>
<html lang="en">
<head>
<base href="/">
<title>App Tests</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://unpkg.com/jasmine-core@2.99.1/lib/jasmine-core/jasmine.css">
</head>
</html>
<!--
Intentionally empty placeholder for Stackblitz.
Do not need index.html in zip-download either as you should run tests with `npm test`
-->

View File

@ -0,0 +1 @@
@import "~jasmine-core/lib/jasmine-core/jasmine.css"

View File

@ -0,0 +1,3 @@
{
"projectType": "testing"
}

View File

@ -1,11 +1,4 @@
<!-- Add the app test styles-->
<!DOCTYPE html>
<html lang="en">
<head>
<base href="/">
<title>App Tests</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://unpkg.com/jasmine-core@2.99.1/lib/jasmine-core/jasmine.css">
</head>
</html>
<!--
Intentionally empty placeholder for Stackblitz.
Do not need index.html in zip-download either as you should run tests with `npm test`
-->

View File

@ -6,7 +6,6 @@
<title>App Under Test</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://unpkg.com/jasmine-core@2.99.1/lib/jasmine-core/jasmine.css">
</head>
<body>

View File

@ -0,0 +1 @@
@import "~jasmine-core/lib/jasmine-core/jasmine.css"

View File

@ -32,8 +32,6 @@ Currently you will find the next boilerplates:
* systemjs - Currently in deprecation, only used in a a few examples.
* i18n - Based on the CLI one, features a few scripts for i18n.
* universal - Based on the cli with a extra server for universal.
* elements - Based on the CLI, with a custom `tsconfig.json` for changing the `target`
* testing - Based on the CLI, with extra testing styles
There is also a `common` folder that contains files used in all different examples.

View File

@ -61,6 +61,11 @@ BOILERPLATE_PATHS.i18n = [
'package.json'
];
BOILERPLATE_PATHS.testing = [
...cliRelativePath,
'angular.json'
];
BOILERPLATE_PATHS.universal = [
...cliRelativePath,
'angular.json',

View File

@ -0,0 +1,128 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"angular.io-example": {
"root": "",
"sourceRoot": "src",
"projectType": "application",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.app.json",
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"src/styles.css"
],
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "angular.io-example:build"
},
"configurations": {
"production": {
"browserTarget": "angular.io-example:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "angular.io-example:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "src/tsconfig.spec.json",
"karmaConfig": "src/karma.conf.js",
"styles": [
"src/styles.css"
],
"scripts": [],
"assets": [
"src/favicon.ico",
"src/assets"
]
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
},
"angular.io-example-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "angular.io-example:serve"
},
"configurations": {
"production": {
"devServerTarget": "angular.io-example:serve:production"
}
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": "e2e/tsconfig.e2e.json",
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "angular.io-example"
}