Skip to content

Commit e7dc789

Browse files
committed
dist name
1 parent 70b0675 commit e7dc789

4 files changed

Lines changed: 50 additions & 6 deletions

File tree

dist/index.html

Lines changed: 33 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
<title>QR Element</title>
77
<meta name="description" content="A simple QR Code Web Component">
88
<style>
9-
:root {
10-
color-scheme: dark light;
11-
}
12-
139
/** Prevent CLS */
1410
qr-element {
1511
display: block;
@@ -26,8 +22,31 @@
2622
}
2723
}
2824
}
25+
26+
/** basic page styling */
27+
:root {
28+
color-scheme: dark light;
29+
}
30+
31+
a {
32+
color: lightblue;
33+
}
34+
35+
body {
36+
margin-inline-start: auto;
37+
margin-inline-end: auto;
38+
max-width: 30rem;
39+
}
40+
41+
ul {
42+
padding: 1rem;
43+
background-color: #333;
44+
list-style-type: none;
45+
display: flex;
46+
gap: 2rem;
47+
}
2948
</style>
30-
<script type="module" crossorigin src="/assets/index-CLtdk9yj.js"></script>
49+
<script type="module" crossorigin src="./index.js"></script>
3150
</head>
3251
<body>
3352
<h1>Rendering a QR code</h1>
@@ -44,5 +63,14 @@ <h2>change the size passing the px to the width attribute</h2>
4463

4564
<h2> Custom colors: using the host background-color and the ::part(canvas)</h2>
4665
<qr-element class="blue" input="https://dgrammatiko.dev"></qr-element>
66+
67+
<hr>
68+
69+
<ul>
70+
<li><a href="https://github.com/dgrammatiko/qr-element">Github repo</a></li>
71+
<li><a href="https://github.com/dgrammatiko/qr-element">NPM package</a></li>
72+
<li><a href="https://dgrammatiko.dev">by dGrammatiko</a></li>
73+
</ul>
74+
4775
</body>
4876
</html>

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
"description": "Creates a QR image",
55
"main": "src/index.mjs",
66
"scripts": {
7-
"dev": "npx vite"
7+
"dev": "npx vite",
8+
"build": "npx vite build --config ./vite.config.js"
89
},
910
"dependencies": {
1011
"headless-qr": "^1.0.3"

vite.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
export default {
2+
base: './',
3+
root: './',
4+
build: {
5+
// emptyOutDir: false
6+
outDir: './dist',
7+
rollupOptions: {
8+
output: {
9+
assetFileNames: '[name].[ext]',
10+
chunkFileNames: '[name].[ext]',
11+
entryFileNames: '[name].js',
12+
},
13+
},
14+
},
15+
};

0 commit comments

Comments
 (0)