Skip to content

Commit a67c6ce

Browse files
authored
Merge pull request #203 from oracle/bump-angular-19.1
Bump node-angular template to angular 19.1
2 parents 5c81499 + e8bd43e commit a67c6ce

20 files changed

+238
-122
lines changed

templates/node-angular/.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Editor configuration, see https://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
ij_typescript_use_double_quotes = false
14+
15+
[*.md]
16+
max_line_length = off
17+
trim_trailing_whitespace = false
Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1-
# See http://help.github.com/ignore-files/ for more about ignoring files.
1+
# See https://docs.github.com/get-started/getting-started-with-git/ignoring-files for more about ignoring files.
22

33
# Compiled output
44
/dist
55
/tmp
66
/out-tsc
77
/bazel-out
8-
/dist-ssr
98

109
# Node
1110
/node_modules
1211
npm-debug.log
1312
yarn-error.log
14-
yarn-debug.log*
15-
pnpm-debug.log*
16-
lerna-debug.log*
1713

1814
# IDEs and editors
1915
.idea/
@@ -23,14 +19,14 @@ lerna-debug.log*
2319
*.launch
2420
.settings/
2521
*.sublime-workspace
26-
*.local
2722

2823
# Visual Studio Code
2924
.vscode/*
3025
!.vscode/settings.json
3126
!.vscode/tasks.json
3227
!.vscode/launch.json
3328
!.vscode/extensions.json
29+
.history/*
3430

3531
# Miscellaneous
3632
/.angular/cache
@@ -42,19 +38,12 @@ testem.log
4238
/typings
4339
/server/utils/db/wallet
4440

45-
# System files
46-
.DS_Store
47-
Thumbs.db
48-
49-
# Logs
50-
logs
51-
*.log
52-
5341
# Environment variables
5442
/.env
5543
/.env.*
5644
!/.env.example
5745
!/.env.*.example
5846

59-
# Editor directories and files
60-
.history/*
47+
# System files
48+
.DS_Store
49+
Thumbs.db
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=827846
3+
"recommendations": ["angular.ng-template"]
4+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
3+
"version": "0.2.0",
4+
"configurations": [
5+
{
6+
"name": "ng serve",
7+
"type": "chrome",
8+
"request": "launch",
9+
"preLaunchTask": "npm: start",
10+
"url": "http://localhost:4200/"
11+
},
12+
{
13+
"name": "ng test",
14+
"type": "chrome",
15+
"request": "launch",
16+
"preLaunchTask": "npm: test",
17+
"url": "http://localhost:9876/debug.html"
18+
}
19+
]
20+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
// For more information, visit: https://go.microsoft.com/fwlink/?LinkId=733558
3+
"version": "2.0.0",
4+
"tasks": [
5+
{
6+
"type": "npm",
7+
"script": "start",
8+
"isBackground": true,
9+
"problemMatcher": {
10+
"owner": "typescript",
11+
"pattern": "$tsc",
12+
"background": {
13+
"activeOnStart": true,
14+
"beginsPattern": {
15+
"regexp": "(.*?)"
16+
},
17+
"endsPattern": {
18+
"regexp": "bundle generation complete"
19+
}
20+
}
21+
}
22+
},
23+
{
24+
"type": "npm",
25+
"script": "test",
26+
"isBackground": true,
27+
"problemMatcher": {
28+
"owner": "typescript",
29+
"pattern": "$tsc",
30+
"background": {
31+
"activeOnStart": true,
32+
"beginsPattern": {
33+
"regexp": "(.*?)"
34+
},
35+
"endsPattern": {
36+
"regexp": "bundle generation complete"
37+
}
38+
}
39+
}
40+
}
41+
]
42+
}

templates/node-angular/README.md

Lines changed: 41 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,60 @@
22
33
# NodeAngular
44

5-
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.
5+
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.1.3.
66

77
## Development server
88

9-
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.
9+
To start a local development server, run:
10+
11+
```bash
12+
ng serve
13+
```
14+
15+
Once the server is running, open your browser and navigate to `http://localhost:4200/`. The application will automatically reload whenever you modify any of the source files.
1016

1117
## Code scaffolding
1218

13-
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`.
19+
Angular CLI includes powerful code scaffolding tools. To generate a new component, run:
20+
21+
```bash
22+
ng generate component component-name
23+
```
24+
25+
For a complete list of available schematics (such as `components`, `directives`, or `pipes`), run:
26+
27+
```bash
28+
ng generate --help
29+
```
1430

15-
## Build
31+
## Building
1632

17-
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
33+
To build the project run:
34+
35+
```bash
36+
ng build
37+
```
38+
39+
This will compile your project and store the build artifacts in the `dist/` directory. By default, the production build optimizes your application for performance and speed.
1840

1941
## Running unit tests
2042

21-
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
43+
To execute unit tests with the [Karma](https://karma-runner.github.io) test runner, use the following command:
44+
45+
```bash
46+
ng test
47+
```
2248

2349
## Running end-to-end tests
2450

25-
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.
51+
For end-to-end (e2e) testing, run:
52+
53+
```bash
54+
ng e2e
55+
```
56+
57+
Angular CLI does not come with an end-to-end testing framework by default. You can choose one that suits your needs.
2658

27-
## Further help
59+
## Additional Resources
2860

29-
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.
61+
For more information on using the Angular CLI, including detailed command references, visit the [Angular CLI Overview and Command Reference](https://angular.dev/tools/cli) page.

templates/node-angular/angular.json

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@
2121
],
2222
"tsConfig": "tsconfig.app.json",
2323
"assets": [
24-
"src/favicon.ico",
25-
"src/assets"
24+
{
25+
"glob": "**/*",
26+
"input": "public"
27+
}
2628
],
2729
"styles": [
2830
"src/styles.css"
@@ -34,13 +36,13 @@
3436
"budgets": [
3537
{
3638
"type": "initial",
37-
"maximumWarning": "500kb",
38-
"maximumError": "1mb"
39+
"maximumWarning": "500kB",
40+
"maximumError": "1MB"
3941
},
4042
{
4143
"type": "anyComponentStyle",
42-
"maximumWarning": "2kb",
43-
"maximumError": "4kb"
44+
"maximumWarning": "4kB",
45+
"maximumError": "8kB"
4446
}
4547
],
4648
"outputHashing": "all"
@@ -66,10 +68,7 @@
6668
"defaultConfiguration": "development"
6769
},
6870
"extract-i18n": {
69-
"builder": "@angular-devkit/build-angular:extract-i18n",
70-
"options": {
71-
"buildTarget": "node-angular:build"
72-
}
71+
"builder": "@angular-devkit/build-angular:extract-i18n"
7372
},
7473
"test": {
7574
"builder": "@angular-devkit/build-angular:karma",
@@ -80,8 +79,10 @@
8079
],
8180
"tsConfig": "tsconfig.spec.json",
8281
"assets": [
83-
"src/favicon.ico",
84-
"src/assets"
82+
{
83+
"glob": "**/*",
84+
"input": "public"
85+
}
8586
],
8687
"styles": [
8788
"src/styles.css"
Lines changed: 48 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,51 @@
1-
import eslint from '@eslint/js';
2-
import tseslint from 'typescript-eslint';
1+
import globals from "globals";
2+
import js from "@eslint/js";
3+
import nodePlugin from "eslint-plugin-n";
4+
import tseslintPlugin from "@typescript-eslint/eslint-plugin";
5+
import tseslintParser from "@typescript-eslint/parser";
36

4-
export default tseslint.config(
5-
eslint.configs.recommended,
6-
...tseslint.configs.recommended,
7-
{
8-
files: [
9-
'**/*.js',
10-
'**/*.jsx',
11-
'**/*.ts',
12-
],
13-
linterOptions: {
14-
reportUnusedDisableDirectives: 'warn'
7+
export default [
8+
{
9+
files: ["src/**/*.js","src/**/*.ts"],
10+
languageOptions: {
11+
ecmaVersion: 2022,
12+
sourceType: "module",
13+
parser: tseslintParser,
14+
parserOptions: {
15+
ecmaFeatures: {
16+
modules: true
1517
},
16-
ignores: [
17-
'dist/**/*',
18-
'node_modules/**/*',
19-
]
18+
ecmaVersion: "2022",
19+
project: "./tsconfig.json",
20+
},
21+
globals: {
22+
...globals.browser,
23+
}
24+
},
25+
plugins: {
26+
"@typescript-eslint": tseslintPlugin
27+
},
28+
rules: {
29+
...js.configs.recommended.rules,
30+
...tseslintPlugin.configs["eslint-recommended"].overrides[0].rules,
31+
...tseslintPlugin.configs["recommended"].rules,
2032
}
21-
);
33+
},
34+
{
35+
files: ["server/**/*.js", "server/**/*.cjs"],
36+
languageOptions: {
37+
ecmaVersion: 2022,
38+
sourceType: "module",
39+
globals: {
40+
...globals.node,
41+
}
42+
},
43+
plugins: {
44+
n: nodePlugin
45+
},
46+
rules: {
47+
...js.configs.recommended.rules,
48+
...nodePlugin.configs["flat/recommended-script"].rules
49+
}
50+
}
51+
];

0 commit comments

Comments
 (0)