svelte-common 4.4.38 → 4.4.41
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/package.json +12 -19
- package/vite.config.js +48 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-common",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.41",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -19,34 +19,27 @@
|
|
|
19
19
|
],
|
|
20
20
|
"license": "BSD-2-Clause",
|
|
21
21
|
"scripts": {
|
|
22
|
-
"start": "
|
|
22
|
+
"start": "vite dev",
|
|
23
23
|
"test": "npm run test:ava && npm run test:cafe",
|
|
24
|
-
"test:cafe": "testcafe $BROWSER:headless tests/cafe/*.js -s build/test --page-request-timeout 9000 --app-init-delay 3000 --app \"
|
|
24
|
+
"test:cafe": "testcafe $BROWSER:headless tests/cafe/*.js -s build/test --page-request-timeout 9000 --app-init-delay 3000 --app \"vite dev\"",
|
|
25
25
|
"test:ava": "ava --timeout 2m tests/*.mjs",
|
|
26
26
|
"docs": "documentation readme --section=API ./src/**/*.mjs",
|
|
27
27
|
"lint": "documentation lint ./src/index.mjs && npm run lint:docs",
|
|
28
|
-
"lint:docs": "documentation lint ./src/**/*.mjs"
|
|
29
|
-
"build": "rollup -c tests/app/rollup.config.mjs"
|
|
28
|
+
"lint:docs": "documentation lint ./src/**/*.mjs"
|
|
30
29
|
},
|
|
31
30
|
"dependencies": {
|
|
32
|
-
"svelte-command": "^1.1.
|
|
33
|
-
"svelte-entitlement": "^1.2.
|
|
31
|
+
"svelte-command": "^1.1.12",
|
|
32
|
+
"svelte-entitlement": "^1.2.22"
|
|
34
33
|
},
|
|
35
34
|
"devDependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@rollup/plugin-virtual": "^2.1.0",
|
|
35
|
+
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.49",
|
|
38
36
|
"ava": "^4.3.0",
|
|
39
37
|
"documentation": "^13.2.5",
|
|
40
|
-
"mf-styling": "^1.2.
|
|
41
|
-
"
|
|
42
|
-
"postcss-import": "^14.1.0",
|
|
43
|
-
"rollup": "^2.75.4",
|
|
44
|
-
"rollup-plugin-dev": "^2.0.0",
|
|
45
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
46
|
-
"rollup-plugin-svelte": "^7.1.0",
|
|
47
|
-
"semantic-release": "^19.0.2",
|
|
38
|
+
"mf-styling": "^1.2.22",
|
|
39
|
+
"semantic-release": "^19.0.3",
|
|
48
40
|
"svelte": "^3.48.0",
|
|
49
|
-
"testcafe": "^1.19.0"
|
|
41
|
+
"testcafe": "^1.19.0",
|
|
42
|
+
"vite": "^2.9.12"
|
|
50
43
|
},
|
|
51
44
|
"repository": {
|
|
52
45
|
"type": "git",
|
|
@@ -61,7 +54,7 @@
|
|
|
61
54
|
"arlac77/template-arlac77-github",
|
|
62
55
|
"arlac77/template-ava",
|
|
63
56
|
"arlac77/template-cloudflare",
|
|
64
|
-
"arlac77/template-svelte-component"
|
|
57
|
+
"arlac77/template-svelte-component#next"
|
|
65
58
|
]
|
|
66
59
|
}
|
|
67
60
|
}
|
package/vite.config.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { readFile } from "fs/promises";
|
|
2
|
+
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
|
3
|
+
import { defineConfig } from "vite";
|
|
4
|
+
|
|
5
|
+
const encodingOptions = { encoding: "utf8" };
|
|
6
|
+
|
|
7
|
+
export default defineConfig(async ({ command, mode }) => {
|
|
8
|
+
const pkg = JSON.parse(
|
|
9
|
+
await readFile(
|
|
10
|
+
new URL("package.json", import.meta.url).pathname,
|
|
11
|
+
encodingOptions
|
|
12
|
+
)
|
|
13
|
+
);
|
|
14
|
+
|
|
15
|
+
const production = mode === "production";
|
|
16
|
+
|
|
17
|
+
process.env["VITE_NAME"] = pkg.name;
|
|
18
|
+
process.env["VITE_DESCRIPTION"] = pkg.description;
|
|
19
|
+
process.env["VITE_VERSION"] = pkg.version;
|
|
20
|
+
|
|
21
|
+
const base = `/components/${pkg.name}/example/`;
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
base,
|
|
25
|
+
root: "tests/app/src",
|
|
26
|
+
worker: { format: "es" },
|
|
27
|
+
plugins: [
|
|
28
|
+
svelte({
|
|
29
|
+
compilerOptions: {
|
|
30
|
+
dev: !production
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
],
|
|
34
|
+
optimizeDeps: {
|
|
35
|
+
exclude: [
|
|
36
|
+
...Object.keys(pkg.dependencies).filter(d => d.startsWith("svelte"))
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
server: { host: true },
|
|
40
|
+
build: {
|
|
41
|
+
outDir: "../build",
|
|
42
|
+
target: "esnext",
|
|
43
|
+
emptyOutDir: true,
|
|
44
|
+
minify: production,
|
|
45
|
+
sourcemap: true
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
});
|