Skip to content

Commit

Permalink
Add Angular 15 support (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
schuchard committed Nov 18, 2022
1 parent 993e7bb commit 0bca687
Show file tree
Hide file tree
Showing 69 changed files with 2,966 additions and 6,927 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,30 @@ yarn reset
- this will symlink the projects so that the Jest schematic command runs from you're local filesystem
- in the local repo you want to run the schematic against, run `ng g @briebug/jest-schematic:add`

### Update sandboxes

When a new version of Angular is released, update all the sandbox apps and libs to the latest version.

_replace `15` with the latest version of Angular_

```shell
cd sandbox

rm single-app

npx @angular/cli@15 new single-app --routing --style=css --skip-git --package-manager=yarn

rm workspace

npx @angular/cli@15 new workspace --create-application=false --skip-git --package-manager=yarn

cd workspace

ng g app app-one --routing --style=css --skip-git

ng g lib lib-one
```

### Dev tips

For faster developing, find and comment out the following line to avoid npm installing dependencies
Expand Down
18 changes: 0 additions & 18 deletions sandboxes/single-app/.browserslistrc

This file was deleted.

23 changes: 9 additions & 14 deletions sandboxes/single-app/.gitignore
Original file line number Diff line number Diff line change
@@ -1,47 +1,42 @@
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
# Compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
# Node
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json
npm-debug.log
yarn-error.log

# IDEs and editors
/.idea
.idea/
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
# Visual Studio Code
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
# Miscellaneous
/.angular/cache
/.sass-cache
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
# System files
.DS_Store
Thumbs.db
12 changes: 6 additions & 6 deletions sandboxes/single-app/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
# Sandbox
# SingleApp

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.6.
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.0.0.

## 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.
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application 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.
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.

## 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/).
Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.

## 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/master/README.md).
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
110 changes: 32 additions & 78 deletions sandboxes/single-app/angular.json
Original file line number Diff line number Diff line change
@@ -1,130 +1,84 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"cli": {
"analytics": false
"packageManager": "yarn"
},
"version": 1,
"newProjectRoot": "projects",
"projects": {
"sandbox": {
"single-app": {
"projectType": "application",
"schematics": {
"@schematics/angular:component": {
"style": "scss"
}
},
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist/sandbox",
"outputPath": "dist/single-app",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"polyfills": ["zone.js"],
"tsConfig": "tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"scripts": [],
"vendorChunk": true,
"extractLicenses": false,
"buildOptimizer": false,
"sourceMap": true,
"optimization": false,
"namedChunks": true
"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,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
"maximumWarning": "2kb",
"maximumError": "4kb"
}
]
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
},
"defaultConfiguration": ""
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "sandbox:build"
},
"configurations": {
"production": {
"browserTarget": "sandbox:build:production"
"browserTarget": "single-app:build:production"
},
"development": {
"browserTarget": "single-app:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "sandbox:build"
"browserTarget": "single-app:build"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": "src/polyfills.ts",
"polyfills": ["zone.js", "zone.js/testing"],
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js",
"assets": ["src/favicon.ico", "src/assets"],
"styles": ["src/styles.scss"],
"styles": ["src/styles.css"],
"scripts": []
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "sandbox:serve"
},
"configurations": {
"production": {
"devServerTarget": "sandbox:serve:production"
}
}
}
}
},
"test2-e2e": {
"root": "e2e/",
"projectType": "application",
"prefix": "",
"architect": {
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
"protractorConfig": "e2e/protractor.conf.js",
"devServerTarget": "test2:serve"
},
"configurations": {
"production": {
"devServerTarget": "test2:serve:production"
}
}
}
}
}
Expand Down
36 changes: 0 additions & 36 deletions sandboxes/single-app/e2e/protractor.conf.js

This file was deleted.

25 changes: 0 additions & 25 deletions sandboxes/single-app/e2e/src/app.e2e-spec.ts

This file was deleted.

11 changes: 0 additions & 11 deletions sandboxes/single-app/e2e/src/app.po.ts

This file was deleted.

10 changes: 0 additions & 10 deletions sandboxes/single-app/e2e/tsconfig.json

This file was deleted.

0 comments on commit 0bca687

Please sign in to comment.