Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
2 changes: 0 additions & 2 deletions .browserslistrc

This file was deleted.

10 changes: 7 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
[*.{js,jsx,ts,tsx,vue}]
indent_style = space
[*.{js,jsx,mjs,cjs,ts,tsx,mts,cts,vue,css,scss,sass,less,styl}]
charset = utf-8
indent_size = 2
trim_trailing_whitespace = true
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

end_of_line = lf
max_line_length = 100
4 changes: 2 additions & 2 deletions .env.development
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VUE_APP_BASE_URL=/
VUE_APP_API_URL=http://localhost:3000
VITE_BASE_URL=/
VITE_API_URL=http://localhost:3000
4 changes: 2 additions & 2 deletions .env.production
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
VUE_APP_BASE_URL=/resources/gabra/
VUE_APP_API_URL=/resources/gabra-api
VITE_BASE_URL=/resources/gabra/
VITE_API_URL=/resources/gabra-api
18 changes: 0 additions & 18 deletions .eslintrc.js

This file was deleted.

1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* text=auto eol=lf
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x]
node-version: [22.x, 24.x]

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use Node.js 12 as the base image
FROM node:12.22
# Use Node.js 22 as the base image
FROM node:22.18

# Set the working directory
WORKDIR /app
Expand Down
31 changes: 19 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,54 +1,61 @@
Ġabra Web Frontend, v3
----------------------
# Ġabra Web Frontend, v4

Ġabra is an open lexicon for Maltese.

This repository contains the source code for the Ġabra web site at
This repository contains the source code for the frontend Ġabra web site at
<http://mlrs.research.um.edu.mt/resources/gabra/>

This repository (version 3) begins in late 2019 with a rewritten version of the site as a frontend-only Vue.js app.
For the backend code, see [gabra-api](https://github.com/MLRS/gabra-api).

Previous versions of the Ġabra site are available in these branches:

- [`v1`](https://github.com/MLRS/gabra-web/tree/v1) (CakePHP 2 and PHP 5)
- [`v2`](https://github.com/MLRS/gabra-web/tree/v2) (CakePHP 3 and PHP 7)
- [`v3`](https://github.com/MLRS/gabra-web/tree/v3) (Vue.js v2)

## Requirements

- Node.js
- Access to **Ġabra API** web service, either locally or live. See <https://github.com/MLRS/gabra-api>.

The path to the API is specified in the `.env*` files.
For documentation about these, see [here](https://cli.vuejs.org/guide/mode-and-env.html#environment-variables).
For documentation about these, see [Vite docs on environment variables](https://vite.dev/guide/env-and-mode).

## Project setup

Install all depedencies needed for building app.
```

```sh
npm install
```

### Compile with hot-reload for development

```sh
npm run dev
```
npm run serve
```
Then open `http://localhost:8080` in a browser.

Then open `http://localhost:5173` in a browser.

### Compile and minify for production
```

```sh
npm run build
```

The contents of `dist` can then be served statically.

#### With Docker
```

```sh
./build-with-docker.sh
```

This will install requirements and build the app inside a Docker container,
then copy the built app to the `dist` folder locally.

### Lint and fix files
```

```sh
npm run lint
```
5 changes: 0 additions & 5 deletions babel.config.js

This file was deleted.

5 changes: 1 addition & 4 deletions deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ FLAGS="--recursive --checksum --compress --verbose --exclude-from=deploy-exclude
set -e

if [ "$1" = "-wet" ]; then
echo "Build Ġabra Web"
npm run build

echo "Deploy Ġabra Web (For real)"
rsync ${FLAGS} ${LOCALDIR} ${HOST}:${REMOTEDIR}
elif [ "$1" = "-delete" ]; then
Expand All @@ -23,6 +20,6 @@ else
rsync --dry-run --delete ${FLAGS} ${LOCALDIR} ${HOST}:${REMOTEDIR}
echo
echo "### This was just a dry-run. ###"
echo "To push for real, use the flag '-wet'"
echo "To delete extra files from server, use the flag '-delete' (potentially dangerous)"
echo "To build & push for real, use the flag '-wet'"
fi
1 change: 1 addition & 0 deletions env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/// <reference types="vite/client" />
22 changes: 22 additions & 0 deletions eslint.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { globalIgnores } from 'eslint/config'
import { defineConfigWithVueTs, vueTsConfigs } from '@vue/eslint-config-typescript'
import pluginVue from 'eslint-plugin-vue'

// To allow more languages other than `ts` in `.vue` files, uncomment the following lines:
// import { configureVueProject } from '@vue/eslint-config-typescript'
// configureVueProject({ scriptLangs: ['ts', 'tsx'] })
// More info at https://github.com/vuejs/eslint-config-typescript/#advanced-setup

export default defineConfigWithVueTs(
pluginVue.configs['flat/essential'],
vueTsConfigs.recommended,
{
name: 'app/files-to-lint',
files: ['**/*.{ts,mts,tsx,vue}'],
rules: {
'vue/multi-word-component-names': 'off',
},
},

globalIgnores(['**/dist/**', '**/dist-ssr/**', '**/coverage/**']),
)
18 changes: 18 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<!doctype html>
<html lang="" data-bs-theme="">
<head>
<meta charset="utf-8">
<link rel="icon" href="/favicon.ico">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Ġabra</title>
<link href="/fontawesome/fontawesome.min.css" rel="stylesheet" />
<link href="/fontawesome/solid.min.css" rel="stylesheet" />
</head>
<body>
<noscript>
<strong>We're sorry but Ġabra does not work without JavaScript enabled.</strong>
</noscript>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading