| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,7 @@ | |
| "@angular/core": "^15.0.0" | ||
| }, | ||
| "dependencies": { | ||
| "tslib": "^2.3.0", | ||
| "glob": "^9.3.1" | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # We want to run tests large with ever green browser so that | ||
| # we never trigger differential loading as this will slow down the tests. | ||
|
|
||
| last 2 Chrome versions |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Editor configuration, see https://editorconfig.org | ||
| root = true | ||
|
|
||
| [*] | ||
| charset = utf-8 | ||
| indent_style = space | ||
| indent_size = 2 | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
|
|
||
| [*.md] | ||
| max_line_length = off | ||
| trim_trailing_whitespace = false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Don't ignore node_modules, this project is not meant to be installed. | ||
| # Also, ~ import path in styles does only looks in the first node_modules found. | ||
| # /node_modules |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # HelloWorldApp | ||
|
|
||
| This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 1.7.0-beta.1. | ||
|
|
||
| ## Development server | ||
|
|
||
| Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. | ||
|
|
||
| ## Code scaffolding | ||
|
|
||
| Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. | ||
|
|
||
| ## Build | ||
|
|
||
| Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `-prod` flag for a production build. | ||
|
|
||
| ## Running unit tests | ||
|
|
||
| Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). | ||
|
|
||
| ## Running end-to-end tests | ||
|
|
||
| Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). | ||
|
|
||
| ## Further help | ||
|
|
||
| To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/main/README.md). |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,162 @@ | ||
| { | ||
| "$schema": "../../../../packages/angular_devkit/core/src/workspace/workspace-schema.json", | ||
| "version": 1, | ||
| "newProjectRoot": "./projects", | ||
| "cli": { | ||
| "cache": { | ||
| "enabled": false | ||
| } | ||
| }, | ||
| "schematics": {}, | ||
| "projects": { | ||
| "app": { | ||
| "root": "src", | ||
| "sourceRoot": "src", | ||
| "projectType": "application", | ||
| "prefix": "app", | ||
| "schematics": {}, | ||
| "targets": { | ||
| "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", | ||
| "progress": false, | ||
| "sourceMap": false, | ||
| "aot": false, | ||
| "vendorChunk": true, | ||
| "buildOptimizer": false, | ||
| "optimization": false, | ||
| "extractLicenses": false, | ||
| "namedChunks": true, | ||
| "assets": [ | ||
| "src/favicon.ico", | ||
| "src/assets" | ||
| ], | ||
| "styles": [ | ||
| "src/styles.css" | ||
| ], | ||
| "scripts": [] | ||
| }, | ||
| "configurations": { | ||
| "production": { | ||
| "optimization": true, | ||
| "outputHashing": "all", | ||
| "sourceMap": false, | ||
| "namedChunks": false, | ||
| "aot": true, | ||
| "extractLicenses": true, | ||
| "vendorChunk": false, | ||
| "buildOptimizer": true | ||
| }, | ||
| "inline-critical-css": { | ||
| "optimization": { | ||
| "styles": { | ||
| "minify": true, | ||
| "inlineCritical": true | ||
| }, | ||
| "scripts": true, | ||
| "fonts": true | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "server": { | ||
| "builder": "@angular-devkit/build-angular:server", | ||
| "options": { | ||
| "outputPath": "dist-server", | ||
| "main": "src/main.server.ts", | ||
| "tsConfig": "src/tsconfig.server.json", | ||
| "progress": false, | ||
| "sourceMap": true, | ||
| "optimization": false, | ||
| "extractLicenses": false | ||
| } | ||
| }, | ||
| "app-shell": { | ||
| "builder": "@angular-devkit/build-angular:app-shell", | ||
| "options": { | ||
| "browserTarget": "app:build", | ||
| "serverTarget": "app:server" | ||
| }, | ||
| "configurations": { | ||
| "production": { | ||
| "browserTarget": "app:build:production" | ||
| } | ||
| } | ||
| }, | ||
| "serve": { | ||
| "builder": "@angular-devkit/build-angular:dev-server", | ||
| "options": { | ||
| "browserTarget": "app:build", | ||
| "watch": false | ||
| }, | ||
| "configurations": { | ||
| "production": { | ||
| "browserTarget": "app:build:production" | ||
| } | ||
| } | ||
| }, | ||
| "extract-i18n": { | ||
| "builder": "@angular-devkit/build-angular:extract-i18n", | ||
| "options": { | ||
| "browserTarget": "app:build", | ||
| "progress": false, | ||
| "outputPath": "src" | ||
| } | ||
| }, | ||
| "test": { | ||
| "builder": "@angular-devkit/build-angular:karma", | ||
| "options": { | ||
| "polyfills": ["zone.js", "zone.js/testing"], | ||
|
|
||
| "tsConfig": "src/tsconfig.spec.json", | ||
| "karmaConfig": "karma.conf.js", | ||
| "browsers": "ChromeHeadlessCI", | ||
| "progress": false, | ||
| "watch": false, | ||
| "styles": [ | ||
| { | ||
| "input": "src/styles.css" | ||
| } | ||
| ], | ||
| "scripts": [], | ||
| "assets": [ | ||
| "src/favicon.ico", | ||
| "src/assets" | ||
| ] | ||
| } | ||
| }, | ||
| "ngsscbuild": { | ||
| "builder": "angular-server-side-configuration:ngsscbuild", | ||
| "options": { | ||
| "additionalEnvironmentVariables": [], | ||
| "browserTarget": "app:build" | ||
| }, | ||
| "configurations": { | ||
| "production": { | ||
| "browserTarget": "app:build:production" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "app-e2e": { | ||
| "root": "e2e", | ||
| "projectType": "application", | ||
| "targets": { | ||
| "e2e": { | ||
| "builder": "@angular-devkit/build-angular:protractor", | ||
| "options": { | ||
| "protractorConfig": "protractor.conf.js", | ||
| "devServerTarget": "app:serve", | ||
| "webdriverUpdate": false | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google LLC All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| // Karma configuration file, see link for more information | ||
| // https://karma-runner.github.io/1.0/config/configuration-file.html | ||
|
|
||
| const path = require('path'); | ||
| process.env.CHROME_BIN = require('puppeteer').executablePath(); | ||
|
|
||
| module.exports = function(config) { | ||
| config.set({ | ||
| basePath: '', | ||
| frameworks: ['jasmine', '@angular-devkit/build-angular'], | ||
| plugins: [ | ||
| require('karma-jasmine'), | ||
| require('karma-chrome-launcher'), | ||
| require('karma-jasmine-html-reporter'), | ||
| require('karma-coverage'), | ||
| require('@angular-devkit/build-angular/plugins/karma'), | ||
| ], | ||
| client: { | ||
| clearContext: false, // leave Jasmine Spec Runner output visible in browser | ||
| }, | ||
| jasmineHtmlReporter: { | ||
| suppressAll: true // removes the duplicated traces | ||
| }, | ||
| coverageReporter: { | ||
| dir: path.join(__dirname, './coverage'), | ||
| subdir: '.', | ||
| reporters: [ | ||
| {type: 'lcov'}, | ||
| ], | ||
| }, | ||
| reporters: ['progress', 'kjhtml'], | ||
| port: 9876, | ||
| colors: true, | ||
| logLevel: config.LOG_INFO, | ||
| autoWatch: true, | ||
| browsers: ['Chrome'], | ||
| customLaunchers: { | ||
| ChromeHeadlessCI: { | ||
| base: 'ChromeHeadless', | ||
| flags: ['--disable-gpu'], | ||
| }, | ||
| }, | ||
| singleRun: false, | ||
| }); | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google LLC All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| // Protractor configuration file, see link for more information | ||
| // https://github.com/angular/protractor/blob/master/lib/config.ts | ||
|
|
||
| const { SpecReporter, StacktraceOption } = require('jasmine-spec-reporter'); | ||
| const { resolve } = require('path'); | ||
|
|
||
| exports.config = { | ||
| allScriptsTimeout: 11000, | ||
| specs: ['./e2e/**/*.e2e-spec.ts'], | ||
| capabilities: { | ||
| browserName: 'chrome', | ||
| chromeOptions: { | ||
| args: ['--headless', '--disable-gpu', '--window-size=800,600'], | ||
| binary: require('puppeteer').executablePath(), | ||
| }, | ||
| }, | ||
| directConnect: true, | ||
| baseUrl: 'http://localhost:4200/', | ||
| framework: 'jasmine', | ||
| jasmineNodeOpts: { | ||
| showColors: true, | ||
| defaultTimeoutInterval: 30000, | ||
| print: function() {}, | ||
| }, | ||
| onPrepare() { | ||
| require('ts-node').register({ | ||
| project: resolve(__dirname, './e2e/tsconfig.e2e.json'), | ||
| }); | ||
| jasmine.getEnv().addReporter(new SpecReporter({ | ||
| spec: { | ||
| displayStacktrace: StacktraceOption.PRETTY | ||
| } | ||
| })); | ||
| }, | ||
| }; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| <!--The content below is only a placeholder and can be replaced.--> | ||
| <div style="text-align:center"> | ||
| <h1> | ||
| Welcome to {{ title }}! | ||
| </h1> | ||
| <img width="300" alt="Angular Logo" src="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAyNTAgMjUwIj4KICAgIDxwYXRoIGZpbGw9IiNERDAwMzEiIGQ9Ik0xMjUgMzBMMzEuOSA2My4ybDE0LjIgMTIzLjFMMTI1IDIzMGw3OC45LTQzLjcgMTQuMi0xMjMuMXoiIC8+CiAgICA8cGF0aCBmaWxsPSIjQzMwMDJGIiBkPSJNMTI1IDMwdjIyLjItLjFWMjMwbDc4LjktNDMuNyAxNC4yLTEyMy4xTDEyNSAzMHoiIC8+CiAgICA8cGF0aCAgZmlsbD0iI0ZGRkZGRiIgZD0iTTEyNSA1Mi4xTDY2LjggMTgyLjZoMjEuN2wxMS43LTI5LjJoNDkuNGwxMS43IDI5LjJIMTgzTDEyNSA1Mi4xem0xNyA4My4zaC0zNGwxNy00MC45IDE3IDQwLjl6IiAvPgogIDwvc3ZnPg=="> | ||
| </div> | ||
| <h2>Here are some links to help you start: </h2> | ||
| <ul> | ||
| <li> | ||
| <h2><a target="_blank" rel="noopener" href="https://angular.io/tutorial">Tour of Heroes</a></h2> | ||
| </li> | ||
| <li> | ||
| <h2><a target="_blank" rel="noopener" href="https://github.com/angular/angular-cli/wiki">CLI Documentation</a></h2> | ||
| </li> | ||
| <li> | ||
| <h2><a target="_blank" rel="noopener" href="https://blog.angular.io/">Angular blog</a></h2> | ||
| </li> | ||
| </ul> | ||
|
|
||
| <p i18n>i18n test</p> | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google LLC All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| import { TestBed } from '@angular/core/testing'; | ||
| import { AppComponent } from './app.component'; | ||
| describe('AppComponent', () => { | ||
| beforeEach(async () => { | ||
| await TestBed.configureTestingModule({ | ||
| declarations: [AppComponent], | ||
| }).compileComponents(); | ||
| }); | ||
| it('should create the app', () => { | ||
| const fixture = TestBed.createComponent(AppComponent); | ||
| const app = fixture.debugElement.componentInstance; | ||
| expect(app).toBeTruthy(); | ||
| }); | ||
| it(`should have as title 'app'`, () => { | ||
| const fixture = TestBed.createComponent(AppComponent); | ||
| const app = fixture.debugElement.componentInstance; | ||
| expect(app.title).toEqual('app'); | ||
| }); | ||
| it('should render title in a h1 tag', () => { | ||
| const fixture = TestBed.createComponent(AppComponent); | ||
| fixture.detectChanges(); | ||
| const compiled = fixture.debugElement.nativeElement; | ||
| expect(compiled.querySelector('h1').textContent).toContain('Welcome to app!'); | ||
| }); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google LLC All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| import { Component } from '@angular/core'; | ||
|
|
||
| @Component({ | ||
| selector: 'app-root', | ||
| templateUrl: './app.component.html', | ||
| styleUrls: ['./app.component.css'], | ||
| }) | ||
| export class AppComponent { | ||
| title = process.env.TEST; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google LLC All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| import { BrowserModule } from '@angular/platform-browser'; | ||
| import { NgModule } from '@angular/core'; | ||
|
|
||
|
|
||
| import { AppComponent } from './app.component'; | ||
|
|
||
|
|
||
| @NgModule({ | ||
| declarations: [ | ||
| AppComponent | ||
| ], | ||
| imports: [ | ||
| BrowserModule | ||
| ], | ||
| providers: [], | ||
| bootstrap: [AppComponent] | ||
| }) | ||
| export class AppModule { } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google LLC All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| import { NgModule } from '@angular/core'; | ||
| import { ServerModule } from '@angular/platform-server'; | ||
|
|
||
| import { AppModule } from './app.module'; | ||
| import { AppComponent } from './app.component'; | ||
|
|
||
| @NgModule({ | ||
| imports: [ | ||
| AppModule, | ||
| ServerModule, | ||
| ], | ||
| bootstrap: [AppComponent], | ||
| }) | ||
| export class AppServerModule {} |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| <!doctype html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="utf-8"> | ||
| <title>HelloWorldApp</title> | ||
| <base href="/"> | ||
|
|
||
| <meta name="viewport" content="width=device-width, initial-scale=1"> | ||
| <link rel="icon" type="image/x-icon" href="favicon.ico"> | ||
| </head> | ||
| <body> | ||
| <app-root></app-root> | ||
| </body> | ||
| </html> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google LLC All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| export { AppServerModule } from './app/app.server.module'; |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google LLC All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; | ||
|
|
||
| import { AppModule } from './app/app.module'; | ||
|
|
||
| platformBrowserDynamic() | ||
| .bootstrapModule(AppModule) | ||
| .catch(err => console.log(err)); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,70 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google LLC All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| /** | ||
| * This file includes polyfills needed by Angular and is loaded before the app. | ||
| * You can add your own extra polyfills to this file. | ||
| * | ||
| * This file is divided into 2 sections: | ||
| * 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers. | ||
| * 2. Application imports. Files imported after ZoneJS that should be loaded before your main | ||
| * file. | ||
| * | ||
| * The current setup is for so-called "evergreen" browsers; the last versions of browsers that | ||
| * automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera), | ||
| * Edge >= 13 on the desktop, and iOS 10 and Chrome on mobile. | ||
| * | ||
| * Learn more in https://angular.io/guide/browser-support | ||
| */ | ||
|
|
||
| /*************************************************************************************************** | ||
| * BROWSER POLYFILLS | ||
| */ | ||
|
|
||
| /** IE10 and IE11 requires the following for NgClass support on SVG elements */ | ||
| // import 'classlist.js'; // Run `npm install --save classlist.js`. | ||
|
|
||
| /** | ||
| * Web Animations `@angular/platform-browser/animations` | ||
| * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari. | ||
| * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0). | ||
| */ | ||
| // import 'web-animations-js'; // Run `npm install --save web-animations-js`. | ||
|
|
||
| /** | ||
| * By default, zone.js will patch all possible macroTask and DomEvents | ||
| * user can disable parts of macroTask/DomEvents patch by setting following flags | ||
| * because those flags need to be set before `zone.js` being loaded, and webpack | ||
| * will put import in the top of bundle, so user need to create a separate file | ||
| * in this directory (for example: zone-flags.ts), and put the following flags | ||
| * into that file, and then add the following code before importing zone.js. | ||
| * import './zone-flags.ts'; | ||
| * | ||
| * The flags allowed in zone-flags.ts are listed here. | ||
| * | ||
| * The following flags will work for all browsers. | ||
| * | ||
| * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame | ||
| * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick | ||
| * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames | ||
| * | ||
| * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js | ||
| * with the following flag, it will bypass `zone.js` patch for IE/Edge | ||
| * | ||
| * (window as any).__Zone_enable_cross_context_check = true; | ||
| * | ||
| */ | ||
|
|
||
| /*************************************************************************************************** | ||
| * Zone JS is required by default for Angular itself. | ||
| */ | ||
| import 'zone.js'; // Included with Angular CLI. | ||
|
|
||
| /*************************************************************************************************** | ||
| * APPLICATION IMPORTS | ||
| */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| <?xml version="1.0" encoding="UTF-8" ?> | ||
| <xliff version="1.2" xmlns="urn:oasis:names:tc:xliff:document:1.2"> | ||
| <file source-language="en" datatype="plaintext" original="ng2.template"> | ||
| <body> | ||
| <trans-unit id="8261100fbc1830397116d0a032e7c8f54af93c68" datatype="html"> | ||
| <source>i18n test</source> | ||
| <context-group purpose="location"> | ||
| <context context-type="sourcefile">app/app.component.ts</context> | ||
| <context context-type="linenumber">21</context> | ||
| </context-group> | ||
| <context-group purpose="location"> | ||
| <context context-type="sourcefile">app/app.component.ts</context> | ||
| <context context-type="linenumber">23</context> | ||
| </context-group> | ||
| </trans-unit> | ||
| </body> | ||
| </file> | ||
| </xliff> |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| /* You can add global styles to this file, and also import other style files */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| { | ||
| "extends": "../tsconfig.json", | ||
| "compilerOptions": { | ||
| "outDir": "../out-tsc/app", | ||
| "types": ["@angular/localize", "node"] | ||
| }, | ||
| "files": [ | ||
| "main.ts", | ||
| "polyfills.ts" | ||
| ], | ||
| "include": [ | ||
| "**/*.d.ts" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| { | ||
| "extends": "./tsconfig.app.json", | ||
| "compilerOptions": { | ||
| "outDir": "../dist-server", | ||
| "baseUrl": "./", | ||
| "types": ["@angular/localize", "node"] | ||
| }, | ||
| "files": [ | ||
| "main.server.ts" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "extends": "../tsconfig.json", | ||
| "compilerOptions": { | ||
| "outDir": "../out-tsc/spec", | ||
| "types": [ | ||
| "jasmine", | ||
| "@angular/localize" | ||
| ] | ||
| }, | ||
| "files": [ | ||
| "polyfills.ts" | ||
| ], | ||
| "include": [ | ||
| "**/*.spec.ts", | ||
| "**/*.d.ts" | ||
| ] | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google LLC All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| /* SystemJS module definition */ | ||
| declare var module: NodeModule; | ||
| interface NodeModule { | ||
| id: string; | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "compileOnSave": false, | ||
| "compilerOptions": { | ||
| "baseUrl": "./", | ||
| "outDir": "./dist/out-tsc", | ||
| "sourceMap": true, | ||
| "declaration": false, | ||
| "moduleResolution": "node", | ||
| "emitDecoratorMetadata": true, | ||
| "experimentalDecorators": true, | ||
| "target": "es2022", | ||
| "module": "es2022", | ||
| "useDefineForClassFields": false, | ||
| "typeRoots": [ | ||
| "node_modules/@types" | ||
| ], | ||
| "lib": [ | ||
| "es2022", | ||
| "dom" | ||
| ] | ||
| }, | ||
| "angularCompilerOptions": { | ||
| "enableIvy": true, | ||
| "disableTypeScriptVersionCheck": true, | ||
| "strictTemplates": true | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| /** | ||
| * @license | ||
| * Copyright Google LLC All Rights Reserved. | ||
| * | ||
| * Use of this source code is governed by an MIT-style license that can be | ||
| * found in the LICENSE file at https://angular.io/license | ||
| */ | ||
|
|
||
| import { Architect, BuilderOutput } from '@angular-devkit/architect'; | ||
| import { WorkspaceNodeModulesArchitectHost } from '@angular-devkit/architect/node'; | ||
| import { TestProjectHost, TestingArchitectHost } from '@angular-devkit/architect/testing'; | ||
| import { Path, getSystemPath, join, normalize, schema, workspaces } from '@angular-devkit/core'; | ||
|
|
||
| // Default timeout for large specs is 2.5 minutes. | ||
| jasmine.DEFAULT_TIMEOUT_INTERVAL = 150000; | ||
|
|
||
| export const workspaceRoot = join(normalize(__dirname), `hello-world-app/`); | ||
| export const host = new TestProjectHost(workspaceRoot); | ||
| export const outputPath: Path = normalize('dist'); | ||
|
|
||
| export const browserTargetSpec = { project: 'app', target: 'build' }; | ||
| export const devServerTargetSpec = { project: 'app', target: 'serve' }; | ||
| export const extractI18nTargetSpec = { project: 'app', target: 'extract-i18n' }; | ||
| export const karmaTargetSpec = { project: 'app', target: 'test' }; | ||
| export const tslintTargetSpec = { project: 'app', target: 'lint' }; | ||
| export const protractorTargetSpec = { project: 'app-e2e', target: 'e2e' }; | ||
|
|
||
| export async function createArchitect(workspaceRoot: Path) { | ||
| const registry = new schema.CoreSchemaRegistry(); | ||
| registry.addPostTransform(schema.transforms.addUndefinedDefaults); | ||
| const workspaceSysPath = getSystemPath(workspaceRoot); | ||
|
|
||
| const { workspace } = await workspaces.readWorkspace( | ||
| workspaceSysPath, | ||
| workspaces.createWorkspaceHost(host) | ||
| ); | ||
| const architectHost = new TestingArchitectHost( | ||
| workspaceSysPath, | ||
| workspaceSysPath, | ||
| new WorkspaceNodeModulesArchitectHost(workspace, workspaceSysPath) | ||
| ); | ||
| await architectHost.addBuilderFromPackage('..'); | ||
| //require('ts-node').register(require('../projects/angular-server-side-configuration/builders/tsconfig.json')); | ||
| await architectHost.addBuilderFromPackage( | ||
| '../../../../dist/angular-server-side-configuration' | ||
| ); | ||
| const architect = new Architect(architectHost, registry); | ||
|
|
||
| return { | ||
| workspace, | ||
| architectHost, | ||
| architect, | ||
| }; | ||
| } | ||
|
|
||
| export interface BrowserBuildOutput { | ||
| output: BuilderOutput; | ||
| files: { [file: string]: Promise<string> }; | ||
| } |