Skip to content

Commit 51a1072

Browse files
committed
chore: Rename package to wxt
1 parent 5813302 commit 51a1072

31 files changed

+95
-102
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.DS_Store
22
.env
33
.env.*
4-
.exvite
54
.idea
65
.output
6+
.wxt
77
*.log
88
/.vscode/
99
/docs/.vitepress/cache

README.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
1-
# Exvite
1+
# WXT
22

3-
> Next generation framework for building web extensions. Powered by [Vite](https://vitejs.dev/)
4-
5-
Name ideas:
6-
7-
cyfer, wavex, webext, aura, iron, reyna, aggron, wxt, yiga
3+
> Next gen framework for building web extensions. Powered by [Vite](https://vitejs.dev/)
84
95
## Features
106

117
- [x] Supports all browsers
128
- [x] MV2 & MV3 support
139
- [x] Directory based entrypoints
14-
- [x] Virtual content script and background entryoints for default behaviors
10+
- [x] Virtual content script and background entryoints with default behaviors
1511
- [ ] Great DX
1612
- [x] Auto-imports
1713
- [x] TypeScript,
1814
- [x] HMR for HTML pages
19-
- [ ] auto-reload for background and content scripts
15+
- [ ] Auto-reload for background and content scripts
16+
- [x] Unit and E2E tests
2017
- [ ] Open browser during development with extension installed
2118
- [x] Download and bundle remote dependencies
2219
- [x] Supports all major frontend frameworks (Vue, React, Svelte)
23-
- [ ] Project bootstrap
2420
- [ ] Automated publishing
21+
- [ ] Project bootstrap
2522
- [ ] Bundle analysis
2623
- [ ] ~~_Infer permissions from code_~~ Maybe in the future...

demo/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
{
22
"name": "Demo Extension",
33
"version": "1.0.0",
4-
"description": "Demo extension for exvite",
4+
"description": "Demo extension for WXT",
55
"type": "module",
66
"scripts": {
7-
"dev": "pnpm -w build && exvite",
8-
"build": "pnpm -w build && exvite build",
9-
"prepare": "pnpm -w build && exvite prepare"
7+
"dev": "pnpm -w build && wxt",
8+
"build": "pnpm -w build && wxt build",
9+
"prepare": "pnpm -w build && wxt prepare"
1010
},
1111
"dependencies": {
1212
"webextension-polyfill": "^0.10.0"
1313
},
1414
"devDependencies": {
1515
"@types/webextension-polyfill": "^0.10.0",
16-
"exvite": "workspace:*"
16+
"wxt": "workspace:*"
1717
}
1818
}

demo/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"extends": ["../tsconfig.base.json", "./src/.exvite/tsconfig.json"]
2+
"extends": ["../tsconfig.base.json", "./src/.wxt/tsconfig.json"]
33
}

demo/exvite.config.ts renamed to demo/wxt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineConfig } from 'exvite';
1+
import { defineConfig } from 'wxt';
22

33
export default defineConfig({
44
srcDir: 'src',

e2e/tests/auto-imports.test.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ describe('Auto Imports', () => {
1616

1717
await project.build();
1818

19-
expect(await project.serializeFile('.exvite/types/paths.d.ts'))
19+
expect(await project.serializeFile('.wxt/types/paths.d.ts'))
2020
.toMatchInlineSnapshot(`
21-
".exvite/types/paths.d.ts
21+
".wxt/types/paths.d.ts
2222
----------------------------------------
23-
// Generated by exvite
23+
// Generated by wxt
2424
type EntrypointPath =
2525
| \\"/background.js\\"
2626
| \\"/content-scripts/overlay.js\\"
@@ -35,18 +35,18 @@ describe('Auto Imports', () => {
3535

3636
await project.build();
3737

38-
expect(await project.serializeFile('.exvite/types/imports.d.ts'))
38+
expect(await project.serializeFile('.wxt/types/imports.d.ts'))
3939
.toMatchInlineSnapshot(`
40-
".exvite/types/imports.d.ts
40+
".wxt/types/imports.d.ts
4141
----------------------------------------
42-
// Generated by exvite
42+
// Generated by wxt
4343
export {}
4444
declare global {
4545
const browser: typeof import('webextension-polyfill')
46-
const defineBackgroundScript: typeof import('exvite/client')['defineBackgroundScript']
47-
const defineConfig: typeof import('exvite')['defineConfig']
48-
const defineContentScript: typeof import('exvite/client')['defineContentScript']
49-
const mountContentScriptUi: typeof import('exvite/client')['mountContentScriptUi']
46+
const defineBackgroundScript: typeof import('wxt/client')['defineBackgroundScript']
47+
const defineConfig: typeof import('wxt')['defineConfig']
48+
const defineContentScript: typeof import('wxt/client')['defineContentScript']
49+
const mountContentScriptUi: typeof import('wxt/client')['mountContentScriptUi']
5050
}
5151
"
5252
`);

e2e/tests/remote-code.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ describe('Remote Code', () => {
1616
);
1717
expect(output).not.toContain(url);
1818
expect(
19-
await project.fileExists(`.exvite/cache/${encodeURIComponent(url)}`),
19+
await project.fileExists(`.wxt/cache/${encodeURIComponent(url)}`),
2020
).toBe(true);
2121
});
2222
});

e2e/utils.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class TestProject {
1010
private readonly root: string;
1111

1212
constructor(root = 'e2e/project') {
13-
// We can't put each test's project inside e2e/project directly, otherwise the exvite.config.ts
13+
// We can't put each test's project inside e2e/project directly, otherwise the wxt.config.ts
1414
// file is cached and cannot be different between each test. Instead, we add a random ID to the
1515
// end to make each test's path unique.
1616
const id = Math.random().toString(32).substring(3);
@@ -23,7 +23,7 @@ export class TestProject {
2323
description: 'Example description',
2424
version: '0.0.0-test',
2525
dependencies: {
26-
exvite: '../../..',
26+
wxt: '../../..',
2727
},
2828
},
2929
null,
@@ -33,13 +33,13 @@ export class TestProject {
3333
}
3434

3535
/**
36-
* Add a `exvite.config.ts` to the project with specific contents.
36+
* Add a `wxt.config.ts` to the project with specific contents.
3737
*/
3838
setConfigFileConfig(config: UserConfig = {}) {
3939
this.config = config;
4040
this.files.push([
41-
'exvite.config.ts',
42-
`import { defineConfig } from 'exvite'\n\nexport default defineConfig(${JSON.stringify(
41+
'wxt.config.ts',
42+
`import { defineConfig } from 'wxt'\n\nexport default defineConfig(${JSON.stringify(
4343
config,
4444
null,
4545
2,
@@ -86,12 +86,12 @@ export class TestProject {
8686
}
8787

8888
/**
89-
* Read all the files from the test project's `.exvite` directory and combine them into a string
89+
* Read all the files from the test project's `.wxt` directory and combine them into a string
9090
* that can be used in a snapshot.
9191
*/
92-
serializeExviteDir(): Promise<string> {
92+
serializeWxtDir(): Promise<string> {
9393
return this.serializeDir(
94-
resolve(this.config?.srcDir ?? this.root, '.exvite/types'),
94+
resolve(this.config?.srcDir ?? this.root, '.wxt/types'),
9595
);
9696
}
9797

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "exvite",
2+
"name": "wxt",
33
"type": "module",
44
"version": "0.1.0",
5-
"description": "Modern JS framework for building web extensions",
5+
"description": "Next gen framework for building web extensions",
66
"keywords": [
77
"vite",
88
"chrome",
@@ -34,7 +34,7 @@
3434
}
3535
},
3636
"scripts": {
37-
"exvite": "tsx src/cli/index.ts",
37+
"wxt": "tsx src/cli/index.ts",
3838
"build": "run-s -s build:*",
3939
"build:js": "tsup src/index.ts --sourcemap --dts --format esm,cjs",
4040
"build:cli": "tsup src/cli/index.ts -d dist/cli --sourcemap",

pnpm-lock.yaml

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

0 commit comments

Comments
 (0)