Skip to content

Commit 0bca687

Browse files
authored
Add Angular 15 support (#128)
1 parent 993e7bb commit 0bca687

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+2966
-6927
lines changed

README.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,30 @@ yarn reset
9191
- this will symlink the projects so that the Jest schematic command runs from you're local filesystem
9292
- in the local repo you want to run the schematic against, run `ng g @briebug/jest-schematic:add`
9393

94+
### Update sandboxes
95+
96+
When a new version of Angular is released, update all the sandbox apps and libs to the latest version.
97+
98+
_replace `15` with the latest version of Angular_
99+
100+
```shell
101+
cd sandbox
102+
103+
rm single-app
104+
105+
npx @angular/cli@15 new single-app --routing --style=css --skip-git --package-manager=yarn
106+
107+
rm workspace
108+
109+
npx @angular/cli@15 new workspace --create-application=false --skip-git --package-manager=yarn
110+
111+
cd workspace
112+
113+
ng g app app-one --routing --style=css --skip-git
114+
115+
ng g lib lib-one
116+
```
117+
94118
### Dev tips
95119

96120
For faster developing, find and comment out the following line to avoid npm installing dependencies

sandboxes/single-app/.browserslistrc

Lines changed: 0 additions & 18 deletions
This file was deleted.

sandboxes/single-app/.gitignore

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,42 @@
11
# See http://help.github.com/ignore-files/ for more about ignoring files.
22

3-
# compiled output
3+
# Compiled output
44
/dist
55
/tmp
66
/out-tsc
7-
# Only exists if Bazel was run
87
/bazel-out
98

10-
# dependencies
9+
# Node
1110
/node_modules
12-
13-
# profiling files
14-
chrome-profiler-events*.json
15-
speed-measure-plugin*.json
11+
npm-debug.log
12+
yarn-error.log
1613

1714
# IDEs and editors
18-
/.idea
15+
.idea/
1916
.project
2017
.classpath
2118
.c9/
2219
*.launch
2320
.settings/
2421
*.sublime-workspace
2522

26-
# IDE - VSCode
23+
# Visual Studio Code
2724
.vscode/*
2825
!.vscode/settings.json
2926
!.vscode/tasks.json
3027
!.vscode/launch.json
3128
!.vscode/extensions.json
3229
.history/*
3330

34-
# misc
31+
# Miscellaneous
3532
/.angular/cache
36-
/.sass-cache
33+
.sass-cache/
3734
/connect.lock
3835
/coverage
3936
/libpeerconnection.log
40-
npm-debug.log
41-
yarn-error.log
4237
testem.log
4338
/typings
4439

45-
# System Files
40+
# System files
4641
.DS_Store
4742
Thumbs.db

sandboxes/single-app/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
# Sandbox
1+
# SingleApp
22

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

55
## Development server
66

7-
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.
7+
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.
88

99
## Code scaffolding
1010

1111
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`.
1212

1313
## Build
1414

15-
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.
15+
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
1616

1717
## Running unit tests
1818

1919
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
2020

2121
## Running end-to-end tests
2222

23-
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
23+
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.
2424

2525
## Further help
2626

27-
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).
27+
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.

sandboxes/single-app/angular.json

Lines changed: 32 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,84 @@
11
{
22
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3+
"version": 1,
34
"cli": {
4-
"analytics": false
5+
"packageManager": "yarn"
56
},
6-
"version": 1,
77
"newProjectRoot": "projects",
88
"projects": {
9-
"sandbox": {
9+
"single-app": {
1010
"projectType": "application",
11-
"schematics": {
12-
"@schematics/angular:component": {
13-
"style": "scss"
14-
}
15-
},
11+
"schematics": {},
1612
"root": "",
1713
"sourceRoot": "src",
1814
"prefix": "app",
1915
"architect": {
2016
"build": {
2117
"builder": "@angular-devkit/build-angular:browser",
2218
"options": {
23-
"outputPath": "dist/sandbox",
19+
"outputPath": "dist/single-app",
2420
"index": "src/index.html",
2521
"main": "src/main.ts",
26-
"polyfills": "src/polyfills.ts",
22+
"polyfills": ["zone.js"],
2723
"tsConfig": "tsconfig.app.json",
2824
"assets": ["src/favicon.ico", "src/assets"],
29-
"styles": ["src/styles.scss"],
30-
"scripts": [],
31-
"vendorChunk": true,
32-
"extractLicenses": false,
33-
"buildOptimizer": false,
34-
"sourceMap": true,
35-
"optimization": false,
36-
"namedChunks": true
25+
"styles": ["src/styles.css"],
26+
"scripts": []
3727
},
3828
"configurations": {
3929
"production": {
40-
"fileReplacements": [
41-
{
42-
"replace": "src/environments/environment.ts",
43-
"with": "src/environments/environment.prod.ts"
44-
}
45-
],
46-
"optimization": true,
47-
"outputHashing": "all",
48-
"sourceMap": false,
49-
"namedChunks": false,
50-
"extractLicenses": true,
51-
"vendorChunk": false,
52-
"buildOptimizer": true,
5330
"budgets": [
5431
{
5532
"type": "initial",
56-
"maximumWarning": "2mb",
57-
"maximumError": "5mb"
33+
"maximumWarning": "500kb",
34+
"maximumError": "1mb"
5835
},
5936
{
6037
"type": "anyComponentStyle",
61-
"maximumWarning": "6kb",
62-
"maximumError": "10kb"
38+
"maximumWarning": "2kb",
39+
"maximumError": "4kb"
6340
}
64-
]
41+
],
42+
"outputHashing": "all"
43+
},
44+
"development": {
45+
"buildOptimizer": false,
46+
"optimization": false,
47+
"vendorChunk": true,
48+
"extractLicenses": false,
49+
"sourceMap": true,
50+
"namedChunks": true
6551
}
6652
},
67-
"defaultConfiguration": ""
53+
"defaultConfiguration": "production"
6854
},
6955
"serve": {
7056
"builder": "@angular-devkit/build-angular:dev-server",
71-
"options": {
72-
"browserTarget": "sandbox:build"
73-
},
7457
"configurations": {
7558
"production": {
76-
"browserTarget": "sandbox:build:production"
59+
"browserTarget": "single-app:build:production"
60+
},
61+
"development": {
62+
"browserTarget": "single-app:build:development"
7763
}
78-
}
64+
},
65+
"defaultConfiguration": "development"
7966
},
8067
"extract-i18n": {
8168
"builder": "@angular-devkit/build-angular:extract-i18n",
8269
"options": {
83-
"browserTarget": "sandbox:build"
70+
"browserTarget": "single-app:build"
8471
}
8572
},
8673
"test": {
8774
"builder": "@angular-devkit/build-angular:karma",
8875
"options": {
89-
"main": "src/test.ts",
90-
"polyfills": "src/polyfills.ts",
76+
"polyfills": ["zone.js", "zone.js/testing"],
9177
"tsConfig": "tsconfig.spec.json",
92-
"karmaConfig": "karma.conf.js",
9378
"assets": ["src/favicon.ico", "src/assets"],
94-
"styles": ["src/styles.scss"],
79+
"styles": ["src/styles.css"],
9580
"scripts": []
9681
}
97-
},
98-
"e2e": {
99-
"builder": "@angular-devkit/build-angular:protractor",
100-
"options": {
101-
"protractorConfig": "e2e/protractor.conf.js",
102-
"devServerTarget": "sandbox:serve"
103-
},
104-
"configurations": {
105-
"production": {
106-
"devServerTarget": "sandbox:serve:production"
107-
}
108-
}
109-
}
110-
}
111-
},
112-
"test2-e2e": {
113-
"root": "e2e/",
114-
"projectType": "application",
115-
"prefix": "",
116-
"architect": {
117-
"e2e": {
118-
"builder": "@angular-devkit/build-angular:protractor",
119-
"options": {
120-
"protractorConfig": "e2e/protractor.conf.js",
121-
"devServerTarget": "test2:serve"
122-
},
123-
"configurations": {
124-
"production": {
125-
"devServerTarget": "test2:serve:production"
126-
}
127-
}
12882
}
12983
}
13084
}

sandboxes/single-app/e2e/protractor.conf.js

Lines changed: 0 additions & 36 deletions
This file was deleted.

sandboxes/single-app/e2e/src/app.e2e-spec.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.

sandboxes/single-app/e2e/src/app.po.ts

Lines changed: 0 additions & 11 deletions
This file was deleted.

sandboxes/single-app/e2e/tsconfig.json

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)