Skip to content

Commit ad2fee8

Browse files
committed
Add sources that's kind of working
1 parent 92b8f4a commit ad2fee8

92 files changed

Lines changed: 10096 additions & 4 deletions

File tree

Some content is hidden

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

.devcontainer/devcontainer.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "Node.js & JavaScript",
3+
"image": "mcr.microsoft.com/devcontainers/javascript-node",
4+
"features": {
5+
"ghcr.io/devcontainers/features/git-lfs": "none",
6+
"ghcr.io/devcontainers/features/node": "lts"
7+
},
8+
"postCreateCommand": "sh .devcontainer/init.sh",
9+
"customizations": {
10+
"vscode": {
11+
"extensions": [
12+
"-dbaeumer.vscode-eslint"
13+
]
14+
}
15+
}
16+
}

.devcontainer/init.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
corepack install
2+
corepack yarn install
3+
corepack yarn run sdk vscode
4+
corepack enable
5+
jq .recommendations[] .vscode/extensions.json | xargs -n 1 code --install-extension
6+
cp .vscode/settings.example.json .vscode/settings.json

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 2
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/.yarn/** linguist-vendored
2+
/.yarn/releases/* binary
3+
/.yarn/plugins/**/* binary
4+
/.pnp.* linguist-generated
5+
* text=auto eol=lf

.github/workflows/build.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches-ignore: [ 'wip/*' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read
14+
steps:
15+
- uses: actions/checkout@v5
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v5
19+
with:
20+
node-version: 22
21+
cache: npm
22+
23+
- name: Enable corepack
24+
run: corepack enable
25+
26+
- name: Install Yarn
27+
run: corepack install
28+
29+
- name: Get Yarn cache folder
30+
id: yarn-cache-dir
31+
run: echo "cache-dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
32+
33+
- name: Restore Yarn cache
34+
uses: actions/cache@v4
35+
with:
36+
path: ${{ steps.yarn-cache-dir.outputs.cache-dir }}
37+
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
38+
39+
- name: Install dependencies
40+
run: corepack yarn install --immutable
41+
42+
- name: Lint
43+
run: corepack yarn exec biome ci
44+
45+
- name: Test
46+
run: corepack yarn test --reporter=github-actions
47+
48+
- name: Bundle
49+
run: corepack yarn build-js
50+
51+
- name: Upload artifact
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: ext
55+
path: dist/ext/
56+
compression-level: 9
57+

.github/workflows/doc.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches-ignore: [ 'wip/*' ]
6+
paths:
7+
- 'README.md'
8+
- 'doc/**/*'
9+
- '.github/workflows/doc.yml'
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
16+
steps:
17+
- uses: actions/checkout@v5
18+
19+
- name: Setup Node.js
20+
uses: actions/setup-node@v5
21+
with:
22+
node-version: 22
23+
cache: npm
24+
25+
- name: Enable corepack
26+
run: corepack enable
27+
28+
- name: Install Yarn
29+
run: corepack install
30+
31+
- name: Get Yarn cache folder
32+
id: yarn-cache-dir
33+
run: echo "cache-dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
34+
35+
- name: Restore Yarn cache
36+
uses: actions/cache@v4
37+
with:
38+
path: ${{ steps.yarn-cache-dir.outputs.cache-dir }}
39+
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
40+
41+
- name: Install dependencies
42+
run: corepack yarn install --immutable
43+
44+
- name: Generate docs
45+
run: corepack yarn run doc:md
46+
47+
- name: Deploy to GitHub Pages
48+
uses: peaceiris/actions-gh-pages@v3
49+
with:
50+
github_token: ${{ secrets.GITHUB_TOKEN }}
51+
publish_dir: build/doc
52+
destination_dir: ${{ github.ref_name }}
53+
enable_jekyll: true

.github/workflows/release.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: [ 'v*' ]
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
12+
steps:
13+
- uses: actions/checkout@v5
14+
15+
- name: Setup Node.js
16+
uses: actions/setup-node@v5
17+
with:
18+
node-version: 22
19+
cache: npm
20+
21+
- name: Enable corepack
22+
run: corepack enable
23+
24+
- name: Install Yarn
25+
run: corepack install
26+
27+
- name: Get Yarn cache folder
28+
id: yarn-cache-dir
29+
run: echo "cache-dir=$(corepack yarn config get cacheFolder)" >> $GITHUB_OUTPUT
30+
31+
- name: Restore Yarn cache
32+
uses: actions/cache@v4
33+
with:
34+
path: ${{ steps.yarn-cache-dir.outputs.cache-dir }}
35+
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
36+
37+
- name: Install dependencies
38+
run: corepack yarn install --immutable
39+
40+
- name: Build
41+
run: corepack yarn build
42+
43+
- name: Create Release
44+
uses: softprops/action-gh-release@v2
45+
with:
46+
files: dist/*.xpi
47+
generate_release_notes: true

.gitignore

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
index.ts
2+
build/
3+
14
# Logs
25
logs
36
*.log
@@ -34,9 +37,6 @@ bower_components
3437
# node-waf configuration
3538
.lock-wscript
3639

37-
# Compiled binary addons (https://nodejs.org/api/addons.html)
38-
build/Release
39-
4040
# Dependency directories
4141
node_modules/
4242
jspm_packages/
@@ -131,7 +131,6 @@ dist
131131
!.yarn/patches
132132
!.yarn/plugins
133133
!.yarn/releases
134-
!.yarn/sdks
135134
!.yarn/versions
136135

137136
# Vite logs files

.vscode/extensions.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"recommendations": [
3+
"arcanis.vscode-zipfs",
4+
"bierner.markdown-mermaid",
5+
"biomejs.biome",
6+
"EditorConfig.EditorConfig",
7+
"firefox-devtools.vscode-firefox-debug",
8+
"gamunu.vscode-yarn",
9+
"vitest.explorer"
10+
]
11+
}

.vscode/launch.example.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Thunderbird",
6+
"type": "firefox",
7+
"request": "launch",
8+
"reAttach": true,
9+
"firefoxExecutable": "thunderbird",
10+
"reloadOnChange": {
11+
"watch": "${workspaceFolder}/dist/ext/*"
12+
},
13+
"profileDir": "${env:HOME}/path/to/thunderbird-profile/profile.esr",
14+
"keepProfileChanges": false,
15+
"internalConsoleOptions": "openOnSessionStart",
16+
"addonPath": "${workspaceFolder}/dist/ext/"
17+
}
18+
]
19+
}

0 commit comments

Comments
 (0)