svelte-entitlement 1.2.21 → 1.2.24
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 +41 -16
- package/src/entitlement.mjs +0 -5
- package/vite.config.js +47 -0
package/package.json
CHANGED
|
@@ -1,42 +1,45 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "svelte-entitlement",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.24",
|
|
4
4
|
"svelte": "./src/index.svelte",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"component",
|
|
7
7
|
"svelte",
|
|
8
|
+
"vite",
|
|
8
9
|
"web"
|
|
9
10
|
],
|
|
10
11
|
"scripts": {
|
|
11
|
-
"
|
|
12
|
+
"prepare": "vite build",
|
|
13
|
+
"start": "vite dev",
|
|
12
14
|
"test": "npm run test:ava && npm run test:cafe",
|
|
13
|
-
"test:cafe": "testcafe $BROWSER:headless tests/cafe/*.js -s build/test --page-request-timeout 9000 --app-init-delay 3000 --app \"rollup -c tests/app/rollup.config.mjs -w\"",
|
|
14
15
|
"test:ava": "ava --timeout 2m tests/*.mjs",
|
|
16
|
+
"test:cafe": "testcafe $BROWSER:headless tests/cafe/*.js -s build/test --page-request-timeout 9000 --app-init-delay 3000 --app \"vite\"",
|
|
15
17
|
"cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 2m tests/*.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp",
|
|
16
18
|
"docs": "documentation readme --section=API ./src/**/*.mjs",
|
|
17
19
|
"lint": "npm run lint:docs",
|
|
18
20
|
"lint:docs": "documentation lint ./src/**/*.mjs",
|
|
19
|
-
"
|
|
21
|
+
"preview": "vite preview"
|
|
20
22
|
},
|
|
21
23
|
"dependencies": {
|
|
22
24
|
"svelte-dnd-action": "^0.9.18"
|
|
23
25
|
},
|
|
24
26
|
"devDependencies": {
|
|
25
|
-
"@
|
|
26
|
-
"@
|
|
27
|
+
"@semantic-release/commit-analyzer": "^9.0.2",
|
|
28
|
+
"@semantic-release/exec": "^6.0.3",
|
|
29
|
+
"@semantic-release/release-notes-generator": "^10.0.3",
|
|
30
|
+
"@sveltejs/vite-plugin-svelte": "^1.0.0-next.49",
|
|
27
31
|
"ava": "^4.3.0",
|
|
28
32
|
"c8": "^7.11.3",
|
|
29
33
|
"documentation": "^13.2.5",
|
|
30
|
-
"mf-styling": "^1.2.
|
|
31
|
-
"
|
|
32
|
-
"
|
|
33
|
-
"rollup": "^2.75.5",
|
|
34
|
-
"rollup-plugin-dev": "^2.0.4",
|
|
35
|
-
"rollup-plugin-postcss": "^4.0.2",
|
|
36
|
-
"rollup-plugin-svelte": "^7.1.0",
|
|
37
|
-
"semantic-release": "^19.0.2",
|
|
34
|
+
"mf-styling": "^1.2.24",
|
|
35
|
+
"npm-pkgbuild": "^10.9.2",
|
|
36
|
+
"semantic-release": "^19.0.3",
|
|
38
37
|
"svelte": "^3.48.0",
|
|
39
|
-
"testcafe": "^1.19.0"
|
|
38
|
+
"testcafe": "^1.19.0",
|
|
39
|
+
"vite": "^2.9.12"
|
|
40
|
+
},
|
|
41
|
+
"optionalDependencies": {
|
|
42
|
+
"mf-hosting": "^1.6.3"
|
|
40
43
|
},
|
|
41
44
|
"repository": {
|
|
42
45
|
"type": "git",
|
|
@@ -46,11 +49,33 @@
|
|
|
46
49
|
"url": "https://github.com/arlac77/svelte-entitlement/issues"
|
|
47
50
|
},
|
|
48
51
|
"homepage": "https://github.com/arlac77/svelte-entitlement#readme",
|
|
52
|
+
"pkgbuild": {
|
|
53
|
+
"content": {
|
|
54
|
+
"${install.dir}": "build/",
|
|
55
|
+
"${nginx.sites.dir}${name}.conf": "pkg/nginx.conf"
|
|
56
|
+
},
|
|
57
|
+
"groups": "web"
|
|
58
|
+
},
|
|
59
|
+
"release": {
|
|
60
|
+
"plugins": [
|
|
61
|
+
"@semantic-release/commit-analyzer",
|
|
62
|
+
"@semantic-release/release-notes-generator",
|
|
63
|
+
"@semantic-release/npm",
|
|
64
|
+
[
|
|
65
|
+
"@semantic-release/exec",
|
|
66
|
+
{
|
|
67
|
+
"publishCmd": "npx npm-pkgbuild --available --continue --verbose"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"@semantic-release/github"
|
|
71
|
+
]
|
|
72
|
+
},
|
|
49
73
|
"template": {
|
|
50
74
|
"inheritFrom": [
|
|
51
75
|
"arlac77/template-ava-coverage",
|
|
52
76
|
"arlac77/template-cloudflare",
|
|
53
|
-
"arlac77/template-
|
|
77
|
+
"arlac77/template-pacman",
|
|
78
|
+
"arlac77/template-svelte-component#next",
|
|
54
79
|
"arlrac77/template-arlac77-github"
|
|
55
80
|
]
|
|
56
81
|
}
|
package/src/entitlement.mjs
CHANGED
package/vite.config.js
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { svelte } from "@sveltejs/vite-plugin-svelte";
|
|
2
|
+
//import { extractFromPackage } from "npm-pkgbuild/src/module.mjs";
|
|
3
|
+
import { defineConfig } from "vite";
|
|
4
|
+
|
|
5
|
+
export default defineConfig(async ({ command, mode }) => {
|
|
6
|
+
const { extractFromPackage } = await import(
|
|
7
|
+
new URL("node_modules/npm-pkgbuild/src/module.mjs", import.meta.url)
|
|
8
|
+
);
|
|
9
|
+
const res = extractFromPackage({
|
|
10
|
+
dir: new URL("./", import.meta.url).pathname
|
|
11
|
+
});
|
|
12
|
+
const first = await res.next();
|
|
13
|
+
const pkg = first.value;
|
|
14
|
+
const properties = pkg.properties;
|
|
15
|
+
const base = properties["http.path"] + "/";
|
|
16
|
+
const production = mode === "production";
|
|
17
|
+
|
|
18
|
+
process.env["VITE_NAME"] = properties.name;
|
|
19
|
+
process.env["VITE_DESCRIPTION"] = properties.description;
|
|
20
|
+
process.env["VITE_VERSION"] = properties.version;
|
|
21
|
+
|
|
22
|
+
return {
|
|
23
|
+
base,
|
|
24
|
+
root: "tests/app/src",
|
|
25
|
+
worker: { format: "es" },
|
|
26
|
+
plugins: [
|
|
27
|
+
svelte({
|
|
28
|
+
compilerOptions: {
|
|
29
|
+
dev: !production
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
],
|
|
33
|
+
optimizeDeps: {
|
|
34
|
+
exclude: [
|
|
35
|
+
...Object.keys(pkg.dependencies).filter(d => d.startsWith("svelte"))
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
server: { host: true },
|
|
39
|
+
build: {
|
|
40
|
+
outDir: "../../../build",
|
|
41
|
+
target: "esnext",
|
|
42
|
+
emptyOutDir: true,
|
|
43
|
+
minify: production,
|
|
44
|
+
sourcemap: true
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
});
|