Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
f5319a1
chore: remove yarn.lock to standardize on npm (feature: tooling)
devin-ai-integration[bot] Jun 5, 2026
68d25f3
build: upgrade Angular 9 -> 10 via ng update (feature: angular upgrade)
devin-ai-integration[bot] Jun 5, 2026
26743a8
build: add .npmrc legacy-peer-deps for upgrade installs (feature: too…
devin-ai-integration[bot] Jun 5, 2026
0a0c1b2
build: upgrade Angular 10 -> 11 via ng update (feature: angular upgrade)
devin-ai-integration[bot] Jun 5, 2026
7adbef8
build: upgrade Angular 11 -> 12 (Ivy default, View Engine removed) vi…
devin-ai-integration[bot] Jun 5, 2026
9345c00
build: upgrade Angular 12 -> 13 via ng update (feature: angular upgrade)
devin-ai-integration[bot] Jun 5, 2026
fb518cb
build: upgrade Angular 13 -> 14 via ng update (feature: angular upgrade)
devin-ai-integration[bot] Jun 5, 2026
bb2ea47
build: upgrade Angular 14 -> 15 via ng update (feature: angular upgrade)
devin-ai-integration[bot] Jun 5, 2026
5baf118
build: upgrade Angular 15 -> 16 via ng update (feature: angular upgrade)
devin-ai-integration[bot] Jun 5, 2026
084c549
build: upgrade Angular 16 -> 17 via ng update (feature: angular upgrade)
devin-ai-integration[bot] Jun 5, 2026
f00b8d1
build: migrate to Angular 17 application/esbuild builder, inline poly…
devin-ai-integration[bot] Jun 5, 2026
05acf07
build: upgrade RxJS 6->7, remove rxjs-compat/unfetch/node-fetch, bump…
devin-ai-integration[bot] Jun 5, 2026
a953d33
build: migrate TSLint -> ESLint (angular-eslint), fix lint errors (fe…
devin-ai-integration[bot] Jun 5, 2026
78c3cc3
refactor: migrate to standalone components, provideRouter/provideServ…
devin-ai-integration[bot] Jun 5, 2026
dbf721a
feature: adopt Angular 17 control-flow syntax (@if/@for), fix Karma t…
devin-ai-integration[bot] Jun 5, 2026
f66145a
feature: replace Travis CI with GitHub Actions workflow (ci.yml)
devin-ai-integration[bot] Jun 5, 2026
0a3f727
feature: update README for Angular 17 stack, remove obsolete @types/j…
devin-ai-integration[bot] Jun 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
50 changes: 50 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"root": true,
"ignorePatterns": [
"projects/**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:@angular-eslint/recommended",
"plugin:@angular-eslint/template/process-inline-templates"
],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "app",
"style": "camelCase"
}
],
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "app",
"style": "kebab-case"
}
]
}
},
{
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended",
"plugin:@angular-eslint/template/accessibility"
],
"rules": {
"@angular-eslint/template/click-events-have-key-events": "warn",
"@angular-eslint/template/interactive-supports-focus": "warn"
}
}
]
}
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run test -- --watch=false --browsers=ChromeHeadlessNoSandbox
- run: npm run build -- --configuration production
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ speed-measure-plugin.json
.history/*

# misc
/.angular/cache
/.sass-cache
/connect.lock
/coverage
Expand All @@ -44,3 +45,6 @@ testem.log
# System Files
.DS_Store
Thumbs.db

.nx/cache
.nx/workspace-data
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

27 changes: 20 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<p align="center">
<a href="/CONTRIBUTING.md"><img alt="PRs Welcome" src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg"></a>
<a href="https://travis-ci.org/housseindjirdeh/angular2-hn"><img alt="Build Status" src="https://travis-ci.org/housseindjirdeh/angular2-hn.svg?branch=master"></a>
<a href="https://github.com/COG-GTM/angular2-hn/actions/workflows/ci.yml"><img alt="Build Status" src="https://github.com/COG-GTM/angular2-hn/actions/workflows/ci.yml/badge.svg"></a>
</p>

---
Expand Down Expand Up @@ -71,18 +71,31 @@ More to come!

Feel free to send me feedback on [twitter](https://twitter.com/hdjirdeh) or [file an issue](https://github.com/hdjirdeh/angular2-hn/issues/new)! Feature requests are always welcome.

## Tech stack

This app was modernized from Angular 9 to **Angular 17**:

- **Angular 17** with standalone components (no `NgModule`s) and `@if`/`@for` control-flow syntax
- **TypeScript 5.4**
- **RxJS 7**
- **esbuild** `application` builder (the default for new Angular 17 apps)
- **ESLint** + [`angular-eslint`](https://github.com/angular-eslint/angular-eslint) (replacing TSLint/Codelyzer)
- **Karma + Jasmine** for unit tests
- **GitHub Actions** for CI (replacing Travis)
- **Workbox** service worker for offline support, deployed to **Firebase Hosting**

## Build process

Note: This project has been ejected (with AOT + production settings) in order to customize Webpack configurations.
The project uses the standard [Angular CLI](https://angular.io/cli) workflow:

- Clone or download the repo
- `npm install`
- `npm start` to run the application with webpack-dev-server or `npm build` to kick off a fresh build and update the output directory (`dist/`)
- `npm start` to run the development server at `http://localhost:4200`
- `npm run build -- --configuration production` to produce an optimized build in `dist/`
- `npm test` to run unit tests
- `npm run lint` to lint the project

Note: Any Service Worker changes will not be reflected when you run the application locally in development. To test service worker changes:
- `npm build`
- `npm run precache` to generate the service worker file
- `npm run static-serve` to load the application along with the service worker asset using [live-server](https://github.com/tapio/live-server)
The production build automatically generates the Workbox service worker, so offline behavior can be verified by serving the contents of `dist/` with any static file server.

## Contributors

Expand Down
67 changes: 34 additions & 33 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,17 @@
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"builder": "@angular-devkit/build-angular:application",
"options": {
"aot": true,
"outputPath": "dist/angular-hnpwa",
"outputPath": {
"base": "dist/angular-hnpwa",
"browser": ""
},
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"browser": "src/main.ts",
"polyfills": [
"zone.js"
],
"tsConfig": "tsconfig.app.json",
"assets": [
"src/favicon.ico",
Expand All @@ -32,7 +36,10 @@
"styles": [
"src/styles.scss"
],
"scripts": []
"scripts": [],
"extractLicenses": false,
"sourceMap": true,
"optimization": false
},
"configurations": {
"production": {
Expand All @@ -44,13 +51,7 @@
],
"optimization": true,
"outputHashing": "all",
"sourceMap": true,
"extractCss": true,
"namedChunks": true,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
Expand All @@ -62,33 +63,33 @@
"maximumWarning": "6kb"
}
],
"serviceWorker": true,
"ngswConfigPath": "ngsw-config.json"
"serviceWorker": "ngsw-config.json"
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "angular-hnpwa:build"
"buildTarget": "angular-hnpwa:build"
},
"configurations": {
"production": {
"browserTarget": "angular-hnpwa:build:production"
"buildTarget": "angular-hnpwa:build:production"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "angular-hnpwa:build"
"buildTarget": "angular-hnpwa: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": [
Expand All @@ -102,19 +103,6 @@
"scripts": []
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
},
"e2e": {
"builder": "@angular-devkit/build-angular:protractor",
"options": {
Expand All @@ -126,9 +114,22 @@
"devServerTarget": "angular-hnpwa:serve:production"
}
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
]
}
}
}
}
},
"defaultProject": "angular-hnpwa"
"cli": {
"schematicCollections": [
"@angular-eslint/schematics"
]
}
}
3 changes: 1 addition & 2 deletions e2e/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
"compilerOptions": {
"outDir": "../out-tsc/e2e",
"module": "commonjs",
"target": "es5",
"target": "es2018",
"types": [
"jasmine",
"jasminewd2",
"node"
]
}
Expand Down
6 changes: 6 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ module.exports = function (config) {
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['Chrome'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox', '--disable-gpu']
}
},
singleRun: false,
restartOnFileChange: true
});
Expand Down
Loading
Loading