Skip to content

Commit

Permalink
chore: upgrade analog to v1
Browse files Browse the repository at this point in the history
  • Loading branch information
choyiny committed Mar 24, 2024
1 parent 01914a7 commit e48afe2
Show file tree
Hide file tree
Showing 19 changed files with 2,057 additions and 2,760 deletions.
16 changes: 8 additions & 8 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"version": 1,
"newProjectRoot": "projects",
"projects": {
"my-app": {
"course-website": {
"projectType": "application",
"root": "",
"root": ".",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@nx/vite:build",
"builder": "@analogjs/platform:vite",
"options": {
"configFile": "vite.config.ts",
"main": "src/main.ts",
Expand All @@ -28,24 +28,24 @@
}
},
"serve": {
"builder": "@nx/vite:dev-server",
"builder": "@analogjs/platform:vite-dev-server",
"defaultConfiguration": "development",
"options": {
"buildTarget": "my-app:build",
"buildTarget": "course-website:build",
"port": 5173
},
"configurations": {
"development": {
"buildTarget": "my-app:build:development",
"buildTarget": "course-website:build:development",
"hmr": true
},
"production": {
"buildTarget": "my-app:build:production"
"buildTarget": "course-website:build:production"
}
}
},
"test": {
"builder": "@nx/vite:test"
"builder": "@analogjs/platform:vitest"
}
}
}
Expand Down
51 changes: 27 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,36 @@
"version": "3.0.0",
"private": true,
"engines": {
"node": "^16.14.0 || >=18.10.0"
"node": ">=18.13.0"
},
"type": "module",
"scripts": {
"dev": "ng serve",
"ng": "ng",
"start": "yarn dev",
"build": "ng build",
"watch": "ng build --watch",
"test": "ng test",
"prettier": "prettier --write \"{,!(node_modules|dist|build|coverage|.angular)/**/}*.{js,jsx,ts,tsx,json,component.html}\""
"prettier": "prettier --write \"{,!(node_modules|dist|build|coverage|.angular)/**/}*.{js,jsx,ts,tsx,json,component.html,md}\""
},
"husky": {
"hooks": {
"pre-commit": "pretty-quick --staged"
}
},
"dependencies": {
"@analogjs/content": "^0.2.0-rc.3",
"@analogjs/router": "^0.2.0-rc.3",
"@angular/animations": "^16.1.0",
"@angular/common": "^16.1.0",
"@angular/compiler": "^16.1.0",
"@angular/core": "^16.1.0",
"@angular/forms": "^16.1.0",
"@angular/platform-browser": "^16.1.0",
"@angular/platform-browser-dynamic": "^16.1.0",
"@angular/platform-server": "^16.1.0",
"@angular/router": "^16.1.0",
"@nx/angular": "^16.4.0",
"@analogjs/content": "^1.0.1",
"@analogjs/router": "^1.0.1",
"@angular/animations": "^17.3.1",
"@angular/common": "^17.3.1",
"@angular/compiler": "^17.3.1",
"@angular/core": "^17.3.1",
"@angular/forms": "^17.3.1",
"@angular/platform-browser": "^17.3.1",
"@angular/platform-browser-dynamic": "^17.3.1",
"@angular/platform-server": "^17.3.1",
"@angular/router": "^17.3.1",
"@nx/angular": "^18.0.0",
"front-matter": "^4.0.2",
"marked": "^5.0.2",
"marked-gfm-heading-id": "^3.0.4",
Expand All @@ -40,21 +41,23 @@
"prismjs": "^1.29.0",
"rxjs": "~7.5.6",
"tslib": "^2.4.0",
"zone.js": "~0.13.0"
"zone.js": "~0.14.4"
},
"devDependencies": {
"@analogjs/platform": "^0.2.0-rc.3",
"@angular-devkit/build-angular": "^16.1.0",
"@angular/cli": "^16.1.0",
"@angular/compiler-cli": "^16.1.0",
"@nx/vite": "^16.4.0",
"@analogjs/platform": "^1.0.1",
"@angular-devkit/build-angular": "^17.3.1",
"@angular/cli": "^17.3.1",
"@angular/compiler-cli": "^17.3.1",
"@nx/vite": "~16.8.1",
"@nx/devkit": "^18.0.0",
"@analogjs/vite-plugin-angular": "^1.0.1",
"husky": "^8.0.3",
"jsdom": "^22.1.0",
"nx": "^16.4.0",
"nx": "~16.8.1",
"prettier": "^3.0.1",
"pretty-quick": "^3.1.3",
"typescript": "~5.0.2",
"vite": "^4.3.9",
"vitest": "^0.32.0"
"typescript": "~5.4.3",
"vite": "^5.0.0",
"vitest": "^1.3.1"
}
}
2 changes: 1 addition & 1 deletion src/content/coursework/a1.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ releaseDate: 2023-12-28T23:59:00.000Z
dueDate: 2023-11-30T23:59:00.000Z
---

TBD
TBD
2 changes: 1 addition & 1 deletion src/content/coursework/a2.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ releaseDate: 2023-12-30T23:59:00.000Z
dueDate: 2023-11-30T23:59:00.000Z
---

TBD
TBD
2 changes: 1 addition & 1 deletion src/content/coursework/a3.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ releaseDate: 2023-12-31T23:59:00.000Z
dueDate: 2023-11-30T23:59:00.000Z
---

TBD
TBD
2 changes: 1 addition & 1 deletion src/content/coursework/group-project.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ releaseDate: 2023-12-31T23:59:00.000Z
dueDate: 2023-11-30T23:59:00.000Z
---

TBD
TBD
2 changes: 1 addition & 1 deletion src/content/lectures/1.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ week: 1
title: Intro to Web Dev, HTML/CSS
date: 2023-09-04
description: An introduction to web development and its evolution; How to succeed in this course; A quick (re)introduction to HTML and CSS - how to create nice layouts.
googleSlidesUrl:
googleSlidesUrl:
---
2 changes: 1 addition & 1 deletion src/content/lectures/2.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ week: 2
title: Javascript
date: 2023-09-11
description: Learn how to programatically manipulate the Document Object Model (DOM) through Javascript; common coding practices when working with the language; limitations of Javascript running in the browser.
googleSlidesUrl:
googleSlidesUrl:
---
2 changes: 1 addition & 1 deletion src/content/lectures/3.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ week: 3
title: Web API
date: 2023-09-18
description: Create elegant RESTful Application Programming Interfaces (API) with Express.js; Breaking down the HTTP request; Using Javascript to make HTTP requests on the browser without reloading.
googleSlidesUrl:
googleSlidesUrl:
---
2 changes: 1 addition & 1 deletion src/content/lectures/4.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ week: 4
title: Storing Data
date: 2023-09-25
description: Determine the best way of storing application data; Storing and serving images; Using ORMs in backend code; Learn the different methods of pagination and how to properly paginate in the backend; Solving the N+1 problem.
googleSlidesUrl:
googleSlidesUrl:
---
2 changes: 1 addition & 1 deletion src/content/lectures/5.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ week: 5
title: Authentication and Authorization
date: 2023-10-02
description: Protect views from unauthorized individuals; A deep dive into the Open Authorization (OAuth) protocol; Learn the differences between authentication and authorization.
googleSlidesUrl:
googleSlidesUrl:
---
2 changes: 1 addition & 1 deletion src/content/lectures/6.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ week: 7
title: Javascript Event Loop & Frontend Frameworks
date: 2023-10-16
description: An introduction to the Javascript event loop and how to debounce in Javascript using setTimeout. Learn how to use a frontend framework (Angular) to build a web application.
googleSlidesUrl:
googleSlidesUrl:
---
14 changes: 7 additions & 7 deletions src/content/syllabus.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ We encourage you to post questions regarding course materials and assignments on
extended support, the course staff will hold office hours. Please contact course staff via Slack direct message,
we will not respond to any emails.

| | Office Hours | Location |
| ----------------- | --------------------------------------- | -------- |
| Cho Yin Yong | Thursday 7-8pm or by online appointment | TBD |
| | Office Hours | Location |
| ------------ | --------------------------------------- | -------- |
| Cho Yin Yong | Thursday 7-8pm or by online appointment | TBD |

# Course Timing

| | Time | Location | Instructor |
| ------- | ------------------ | -------- | ----------------- |
| LEC01 | Thursday 5-7pm | TBD | Cho Yin Yong |
| | Time | Location | Instructor |
| ----- | -------------- | -------- | ------------ |
| LEC01 | Thursday 5-7pm | TBD | Cho Yin Yong |

# Course Information

Expand Down Expand Up @@ -162,4 +162,4 @@ as soon as possible.
# Credits

Many thanks to Professor [Thierry Sans](https://thierrysans.me) for providing me course material for me to run this
course.
course.
3 changes: 3 additions & 0 deletions src/server/routes/v1/hello.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { defineEventHandler } from "h3";

export default defineEventHandler(() => ({ message: "Hello World" }));
2 changes: 0 additions & 2 deletions src/test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import "@analogjs/vite-plugin-angular/setup-vitest";

import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
Expand Down
1 change: 0 additions & 1 deletion tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": true,
"outDir": "./out-tsc/app",
"types": []
},
Expand Down
1 change: 0 additions & 1 deletion tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"composite": true,
"outDir": "./out-tsc/spec",
"types": ["node", "vitest/globals"]
},
Expand Down
8 changes: 0 additions & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import { defineConfig } from "vite";
import analog from "@analogjs/platform";
import angular from "@analogjs/vite-plugin-angular";

// https://vitejs.dev/config/
export default defineConfig(({ mode }) => ({
Expand Down Expand Up @@ -32,20 +31,13 @@ export default defineConfig(({ mode }) => ({
"/lectures/11",
"/lectures/12",
"/work",
"/work/team-formation",
"/work/group-presentation",
"/work/group-assignment",
"/work/open-source-project",
"/team",
],
sitemap: {
host: "https://cscc09.com",
},
},
}),
angular({
inlineStylesExtension: "scss",
}),
],
test: {
globals: true,
Expand Down
Loading

0 comments on commit e48afe2

Please sign in to comment.