Skip to content

Commit c641983

Browse files
committed
feat(wc): add support for web component
1 parent 875543c commit c641983

13 files changed

+357
-21
lines changed

package.json

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dvcol/trakt-extension",
3-
"version": "0.0.0",
3+
"version": "1.0.0",
44
"title": "Side Trakt (companion app for Trakt.tv)",
55
"description": "Side Trakt, a chrome extension for Trakt.tv",
66
"license": "MIT",
@@ -15,13 +15,21 @@
1515
"node": ">=20",
1616
"pnpm": ">= 8"
1717
},
18+
"main": "./dist/lib/index.js",
19+
"types": "./dist/lib/index.d.ts",
20+
"files": [
21+
"*.md",
22+
"LICENSE",
23+
"dist/lib"
24+
],
1825
"scripts": {
1926
"prepare": "husky install",
2027
"clear": "rimraf dist",
2128
"dist": "pnpm run clear && esno scripts/prepare.ts",
2229
"serve": "vite",
2330
"dev": "cross-env NODE_ENV=development run-p dist serve",
2431
"build": "cross-env NODE_ENV=production pnpm run dist && vue-tsc --noEmit && vite build",
32+
"build:web": "VITE_WEB=true pnpm run build",
2533
"test:unit": "vitest run --environment jsdom --coverage",
2634
"test:watch": "vitest --environment jsdom",
2735
"typecheck": "vue-tsc --noEmit -p tsconfig.vitest.json --composite false",
@@ -89,6 +97,7 @@
8997
"stylelint": "^15.10.3",
9098
"typescript": "^5.1.6",
9199
"vite": "^4.4.9",
100+
"vite-plugin-dts": "^3.5.2",
92101
"vite-plugin-vuetify": "^1.0.2",
93102
"vitest": "^0.34.2",
94103
"vue-tsc": "^1.8.8",

pnpm-lock.yaml

+205
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
File renamed without changes.

src/components/web/AppWeb.ce.vue

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<script setup lang="ts">
2+
import AppView from '~/components/AppView.vue';
3+
</script>
4+
5+
<template>
6+
<link rel="stylesheet" href="styles/init-vue-app.css" />
7+
<AppView />
8+
</template>

src/index.html

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<base target="_blank">
6+
<title>Side Trakt Web</title>
7+
</head>
8+
<body>
9+
<wc-trakt-extension>
10+
Loading component ...
11+
</wc-trakt-extension>
12+
<script type="module" src="./main.ts"></script>
13+
</body>
14+
</html>

0 commit comments

Comments
 (0)