Skip to content

Commit 4ef1e65

Browse files
committed
refactor: modernize codebase, remove Angular and legacy dependencies
- Remove Angular 1.x, jQuery, Gulp, Bower, Skel framework - Replace with vanilla JS (app.js, gauge.js, i18n.js) - Add runtime i18n with ?lang= query param support - Simplify CSS from ~4000 to ~900 lines - Add simple Node.js build script (scripts/build.js) - Convert .po translations to JSON format - Update GitHub Actions workflows for new build - Change Firebase public dir from app/ to dist/ Dependencies reduced from ~680 to 13 packages.
1 parent 80f2c2d commit 4ef1e65

25 files changed

+2838
-4523
lines changed

.github/workflows/firebase-hosting-merge.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,13 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
- run: npm install -g yarn && yarn install --frozen-lockfile && yarn build
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: '20'
20+
- run: npm ci
21+
- run: npm run build
1822
- name: Substitute M-Lab project placeholder
19-
run: sed -i 's/MLAB_PROJECT_PLACEHOLDER/mlab-oti/g' app/measure/measure.js
23+
run: sed -i 's/MLAB_PROJECT_PLACEHOLDER/mlab-oti/g' dist/js/app.js
2024
- uses: FirebaseExtended/action-hosting-deploy@v0
2125
with:
2226
repoToken: '${{ secrets.GITHUB_TOKEN }}'

.github/workflows/firebase-hosting-pull-request.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v4
15-
- run: npm install -g yarn && yarn install --frozen-lockfile && yarn build
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: '20'
18+
- run: npm ci
19+
- run: npm run build
1620
- uses: FirebaseExtended/action-hosting-deploy@v0
1721
with:
1822
repoToken: '${{ secrets.GITHUB_TOKEN }}'

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@ tmp
77
.firebase
88
app/libraries
99
npm-debug.log
10+
dist/

firebase.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"hosting": {
33
"target": "speedtest",
4-
"public": "app",
4+
"public": "dist",
55
"ignore": [
66
"firebase.json",
77
"**/.*",

package-lock.json

Lines changed: 301 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)