mf-examples 1.0.7 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/package.json +11 -4
- package/src/index.html +2 -1
- package/src/main.css +3 -0
- package/vite.config.js +35 -0
package/README.md
CHANGED
|
@@ -5,4 +5,6 @@
|
|
|
5
5
|
[](https://github.com/arlac77/mf-examples/issues)
|
|
6
6
|
[](https://actions-badge.atrox.dev/arlac77/mf-examples/goto)
|
|
7
7
|
[](https://coveralls.io/github/arlac77/mf-examples)
|
|
8
|
-
# mf-examples
|
|
8
|
+
# mf-examples
|
|
9
|
+
|
|
10
|
+
Examples entry page
|
package/package.json
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mf-examples",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"description": "examples entry page",
|
|
8
8
|
"keywords": [
|
|
9
|
+
"vite",
|
|
9
10
|
"web"
|
|
10
11
|
],
|
|
11
12
|
"contributors": [
|
|
@@ -16,11 +17,15 @@
|
|
|
16
17
|
],
|
|
17
18
|
"license": "BSD-2-Clause",
|
|
18
19
|
"scripts": {
|
|
20
|
+
"prepare": "vite build",
|
|
21
|
+
"start": "vite",
|
|
19
22
|
"lint": "npm run lint:css",
|
|
20
|
-
"lint:css": "stylelint ./src/*.css"
|
|
23
|
+
"lint:css": "stylelint ./src/*.css",
|
|
24
|
+
"preview": "vite preview"
|
|
21
25
|
},
|
|
22
26
|
"dependencies": {
|
|
23
27
|
"mf-hosting": "^1.7.1",
|
|
28
|
+
"mf-styling": "^1.2.33",
|
|
24
29
|
"svelte-command": "^1.1.22",
|
|
25
30
|
"svelte-common": "^4.6.10",
|
|
26
31
|
"svelte-entitlement": "^1.2.30",
|
|
@@ -34,7 +39,8 @@
|
|
|
34
39
|
"npm-pkgbuild": "^10.13.0",
|
|
35
40
|
"semantic-release": "^19.0.3",
|
|
36
41
|
"stylelint": "^14.9.1",
|
|
37
|
-
"stylelint-config-standard": "^26.0.0"
|
|
42
|
+
"stylelint-config-standard": "^26.0.0",
|
|
43
|
+
"vite": "^3.0.2"
|
|
38
44
|
},
|
|
39
45
|
"repository": {
|
|
40
46
|
"type": "git",
|
|
@@ -47,7 +53,7 @@
|
|
|
47
53
|
"pkgbuild": {
|
|
48
54
|
"content": {
|
|
49
55
|
"${install.dir}": {
|
|
50
|
-
"base": "
|
|
56
|
+
"base": "build"
|
|
51
57
|
},
|
|
52
58
|
"${nginx.sites.dir}${name}.conf": "pkg/nginx.conf"
|
|
53
59
|
},
|
|
@@ -72,6 +78,7 @@
|
|
|
72
78
|
"inheritFrom": [
|
|
73
79
|
"arlac77/template-arlac77-github",
|
|
74
80
|
"arlac77/template-pacman",
|
|
81
|
+
"arlac77/template-vite",
|
|
75
82
|
"arlac77/template-web-app"
|
|
76
83
|
]
|
|
77
84
|
}
|
package/src/index.html
CHANGED
|
@@ -15,7 +15,8 @@
|
|
|
15
15
|
<link rel="icon" href="images/icon.ico" type="image/x-icon" />
|
|
16
16
|
<link rel="icon" href="images/icon.svg" type="image/svg+xml" sizes="any" />
|
|
17
17
|
<link rel="apple-touch-icon" href="images/icon.png" />
|
|
18
|
-
|
|
18
|
+
<link rel="stylesheet" href="./main.css" />
|
|
19
|
+
|
|
19
20
|
<link rel="manifest" href="manifest.webmanifest" />
|
|
20
21
|
</head>
|
|
21
22
|
|
package/src/main.css
ADDED
package/vite.config.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { defineConfig } from "vite";
|
|
2
|
+
|
|
3
|
+
export default defineConfig(async ({ command, mode }) => {
|
|
4
|
+
const { extractFromPackage } = await import(
|
|
5
|
+
new URL("node_modules/npm-pkgbuild/src/module.mjs", import.meta.url)
|
|
6
|
+
);
|
|
7
|
+
const res = extractFromPackage({
|
|
8
|
+
dir: new URL("./", import.meta.url).pathname
|
|
9
|
+
});
|
|
10
|
+
const first = await res.next();
|
|
11
|
+
const pkg = first.value;
|
|
12
|
+
const properties = pkg.properties;
|
|
13
|
+
const base = properties["http.path"] + "/";
|
|
14
|
+
const production = mode === "production";
|
|
15
|
+
|
|
16
|
+
process.env["VITE_NAME"] = properties.name;
|
|
17
|
+
process.env["VITE_DESCRIPTION"] = properties.description;
|
|
18
|
+
process.env["VITE_VERSION"] = properties.version;
|
|
19
|
+
|
|
20
|
+
const open = process.env.CI ? {} : { open: base };
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
base,
|
|
24
|
+
root: "src",
|
|
25
|
+
worker: { format: "es" },
|
|
26
|
+
server: { host: true, ...open },
|
|
27
|
+
build: {
|
|
28
|
+
outDir: "../build",
|
|
29
|
+
target: "esnext",
|
|
30
|
+
emptyOutDir: true,
|
|
31
|
+
minify: production,
|
|
32
|
+
sourcemap: true
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
});
|