Skip to content

Commit c6e2d65

Browse files
committed
chore: rewrite in Nuxt 3
1 parent cbfbb52 commit c6e2d65

File tree

103 files changed

+10598
-28886
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+10598
-28886
lines changed

.browserslistrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
last 2 chrome versions
2+
last 2 firefox versions
3+
ios_saf >= 15.4
4+
safari >= 15.4

.eslintrc.js

-21
This file was deleted.

.github/dependabot.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
version: 2
22
updates:
3-
- package-ecosystem: npm
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
time: "04:00"
8-
open-pull-requests-limit: 10
9-
ignore:
10-
- dependency-name: sass-loader
11-
versions:
12-
- ">= 11.a, < 12"
3+
- package-ecosystem: npm
4+
directory: '/'
5+
schedule:
6+
interval: daily
7+
time: '04:00'
8+
open-pull-requests-limit: 10
9+
ignore:
10+
- dependency-name: sass-loader
11+
versions:
12+
- '>= 11.a, < 12'

.github/workflows/deploy.yml

+15-16
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,21 @@ on:
77

88
jobs:
99
build:
10-
1110
runs-on: ubuntu-latest
1211

1312
steps:
14-
- uses: actions/checkout@v2
15-
with:
16-
persist-credentials: false
17-
- uses: actions/setup-node@v2
18-
with:
19-
node-version: '16'
20-
- run: npm ci
21-
- run: npm run build
22-
env:
23-
PUBLIC_PATH: /diffr
24-
- uses: JamesIves/github-pages-deploy-action@releases/v3
25-
with:
26-
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
27-
BRANCH: gh-pages
28-
FOLDER: dist
13+
- uses: actions/checkout@v3
14+
with:
15+
persist-credentials: false
16+
- uses: actions/setup-node@v3
17+
with:
18+
node-version: '18'
19+
- run: npm ci
20+
- run: npm run generate
21+
env:
22+
BASE_URL: /diffr/
23+
- uses: JamesIves/github-pages-deploy-action@v4
24+
with:
25+
token: ${{ secrets.ACCESS_TOKEN }}
26+
branch: gh-pages
27+
folder: dist

.gitignore

+6-90
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,9 @@
1-
# Created by .ignore support plugin (hsz.mobi)
2-
### Node template
3-
# Logs
4-
/logs
5-
*.log
6-
npm-debug.log*
7-
yarn-debug.log*
8-
yarn-error.log*
9-
10-
# Runtime data
11-
pids
12-
*.pid
13-
*.seed
14-
*.pid.lock
15-
16-
# Directory for instrumented libs generated by jscoverage/JSCover
17-
lib-cov
18-
19-
# Coverage directory used by tools like istanbul
20-
coverage
21-
22-
# nyc test coverage
23-
.nyc_output
24-
25-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
26-
.grunt
27-
28-
# Bower dependency directory (https://bower.io/)
29-
bower_components
30-
31-
# node-waf configuration
32-
.lock-wscript
33-
34-
# Compiled binary addons (https://nodejs.org/api/addons.html)
35-
build/Release
36-
37-
# Dependency directories
38-
node_modules/
39-
jspm_packages/
40-
41-
# TypeScript v1 declaration files
42-
typings/
43-
44-
# Optional npm cache directory
45-
.npm
46-
47-
# Optional eslint cache
48-
.eslintcache
49-
50-
# Optional REPL history
51-
.node_repl_history
52-
53-
# Output of 'npm pack'
54-
*.tgz
55-
56-
# Yarn Integrity file
57-
.yarn-integrity
58-
59-
# dotenv environment variables file
60-
.env
61-
62-
# parcel-bundler cache (https://parceljs.org/)
63-
.cache
64-
65-
# next.js build output
66-
.next
67-
68-
# nuxt.js build output
1+
node_modules
2+
*.log*
693
.nuxt
70-
71-
# Nuxt generate
4+
.nitro
5+
.cache
6+
.output
7+
.env
728
dist
73-
74-
# vuepress build output
75-
.vuepress/dist
76-
77-
# Serverless directories
78-
.serverless
79-
80-
# IDE / Editor
81-
.idea
82-
83-
# Service worker
84-
sw.*
85-
86-
# macOS
879
.DS_Store
88-
89-
# Vim swap files
90-
*.swp
91-
92-
# V8 report files
93-
/report.*

.npmrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
shamefully-hoist=true
2+
strict-peer-dependencies=false
3+
legacy-peer-deps=true

.prettierrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ requirePragma: false
1010
semi: false
1111
singleQuote: true
1212
tabWidth: 2
13-
trailingComma: none
13+
trailingComma: all
1414
useTabs: false

.vscode/settings.json

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"titleBar.activeBackground": "#47b5e8",
4+
"titleBar.activeForeground": "#15202b",
5+
"titleBar.inactiveBackground": "#47b5e899",
6+
"titleBar.inactiveForeground": "#15202b99",
7+
"sash.hoverBorder": "#74c7ee",
8+
"commandCenter.border": "#15202b99"
9+
},
10+
"peacock.color": "#47b5e8"
11+
}

README.md

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div align="center">
22
<br>
33
<br>
4-
<img src="logo.png" alt="The Diffr logo: two slightly overlapping diamond shapes" width="210" height="140">
4+
<img src="logo.png" alt="The Diffr logo: two slightly overlapping diamond shapes" width="270" height="174">
55

66
<br>
77
</div>
@@ -20,30 +20,36 @@ The core technologies this project uses are:
2020
Technology | Purpose
2121
-|-
2222
**[Monaco Editor](https://microsoft.github.io/monaco-editor/)** | A text/code editor by Microsoft, used for the editing and diffing area itself.
23-
**[NuxtJS](https://nuxtjs.org/)** | An application framework for Vue.js, used for prerendering, PWA support and overall application structure.
23+
**[Nuxt](https://nuxt.com/)** | An application framework for Vue.js, used for prerendering, PWA support and overall application structure.
2424
**[`lz-string`](https://www.npmjs.com/package/lz-string)** | A quick and space-efficient compression algorithm, used for serializing the current app state in the URL anchor in as few characters as possible.
2525
**[GitHub Pages](https://pages.github.com/)** | This app does (purposefully) not generate any income. Therefore, free hosting is essential to keep it running.
2626

2727
## Setup
2828

29-
Clone this repository and install its dependencies using [yarn](https://yarnpkg.com/).
29+
Clone this repository and install its dependencies using [npm](https://npmjs.com/).
3030

3131
```bash
32-
yarn install
32+
npm ci
3333
```
3434

3535
## Local Development
3636

3737
Start a local dev server with hot reloading:
3838

3939
```bash
40-
yarn dev
40+
npm run dev
4141
```
4242

4343
## Generate Production Site
4444

4545
Create a production-ready site in the `dist` folder:
4646

4747
```
48-
yarn build
48+
npm run generate
4949
```
50+
51+
Set the `BASE_URL` environment variable to create a build that can be hosted in a subfolder of a domain, e.g.:
52+
53+
```
54+
BASE_URL=/diffr/ npm run generate
55+
```

app.vue

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<script lang="ts" setup>
2+
useDiffrHead()
3+
</script>
4+
5+
<template>
6+
<VitePwaManifest />
7+
<div>
8+
<NuxtPage />
9+
</div>
10+
</template>

assets/css/global.scss

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
body {
2+
@apply bg-slate-50 text-slate-600 dark:bg-slate-900 dark:text-slate-500;
3+
}
4+
5+
div:where(.diffr-prose) {
6+
@apply prose prose-slate dark:prose-invert prose-headings:font-normal prose-headings:text-slate-400 prose-a:rounded-md prose-a:text-blue-400 prose-a:no-underline focus-visible:prose-a:outline focus-visible:prose-a:outline-2 focus-visible:prose-a:outline-offset-8 focus-visible:prose-a:outline-current dark:prose-headings:text-slate-500 dark:prose-a:text-teal-400;
7+
}

assets/focus-ring.js

-74
This file was deleted.

assets/icons/android.svg

-1
This file was deleted.

assets/icons/icon.svg

-1
This file was deleted.

assets/icons/ios.svg

-1
This file was deleted.

assets/icons/logo.svg

-1
This file was deleted.

assets/listen-outside.js

-23
This file was deleted.

assets/monaco.js

-10
This file was deleted.

0 commit comments

Comments
 (0)