@stacksjs/build 0.50.0 → 0.52.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 +1 -1
- package/dist/desktop.mjs +132 -10
- package/dist/stacks.d.ts +1 -1
- package/dist/stacks.mjs +55 -27
- package/dist/vue-components.mjs +4 -6
- package/package.json +32 -30
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ pnpm test
|
|
|
38
38
|
|
|
39
39
|
Please see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.
|
|
40
40
|
|
|
41
|
-
##
|
|
41
|
+
## 🚜 Contributing
|
|
42
42
|
|
|
43
43
|
Please review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.
|
|
44
44
|
|
package/dist/desktop.mjs
CHANGED
|
@@ -1,17 +1,139 @@
|
|
|
1
|
+
import path from "node:path";
|
|
1
2
|
import { defineConfig } from "vite";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
3
|
+
import Vue from "@vitejs/plugin-vue";
|
|
4
|
+
import Pages from "vite-plugin-pages";
|
|
5
|
+
import generateSitemap from "vite-ssg-sitemap";
|
|
6
|
+
import Components from "unplugin-vue-components/vite";
|
|
7
|
+
import AutoImport from "unplugin-auto-import/vite";
|
|
8
|
+
import Markdown from "vite-plugin-vue-markdown";
|
|
9
|
+
import { VitePWA } from "vite-plugin-pwa";
|
|
10
|
+
import Inspect from "vite-plugin-inspect";
|
|
11
|
+
import LinkAttributes from "markdown-it-link-attributes";
|
|
12
|
+
import Unocss from "@unocss/vite";
|
|
13
|
+
import Shiki from "markdown-it-shiki";
|
|
4
14
|
export default defineConfig({
|
|
15
|
+
resolve: {
|
|
16
|
+
alias: {
|
|
17
|
+
"~/": `${path.resolve(__dirname, "../../../../")}/`
|
|
18
|
+
}
|
|
19
|
+
},
|
|
5
20
|
clearScreen: false,
|
|
6
|
-
server
|
|
7
|
-
|
|
21
|
+
server: {
|
|
22
|
+
port: 3333,
|
|
23
|
+
strictPort: true
|
|
24
|
+
},
|
|
25
|
+
envPrefix: ["VITE_", "TAURI_"],
|
|
8
26
|
plugins: [
|
|
9
|
-
|
|
10
|
-
|
|
27
|
+
Vue({
|
|
28
|
+
include: [/\.vue$/, /\.md$/],
|
|
29
|
+
reactivityTransform: true
|
|
30
|
+
}),
|
|
31
|
+
// https://github.com/hannoeru/vite-plugin-pages
|
|
32
|
+
Pages({
|
|
33
|
+
extensions: ["vue", "md"]
|
|
34
|
+
}),
|
|
35
|
+
// https://github.com/antfu/unplugin-auto-import
|
|
36
|
+
AutoImport({
|
|
37
|
+
imports: [
|
|
38
|
+
"vue",
|
|
39
|
+
"vue-router",
|
|
40
|
+
"vue-i18n",
|
|
41
|
+
"vue/macros",
|
|
42
|
+
"@vueuse/head",
|
|
43
|
+
"@vueuse/core"
|
|
44
|
+
],
|
|
45
|
+
dts: "../../../auto-imports.d.ts",
|
|
46
|
+
dirs: [
|
|
47
|
+
"../../../../functions",
|
|
48
|
+
"../../../../app/stores"
|
|
49
|
+
],
|
|
50
|
+
vueTemplate: true
|
|
51
|
+
}),
|
|
52
|
+
// https://github.com/antfu/unplugin-vue-components
|
|
53
|
+
Components({
|
|
54
|
+
// allow auto load markdown components under `./src/components/`
|
|
55
|
+
extensions: ["vue", "md"],
|
|
56
|
+
// allow auto import and register components used in markdown
|
|
57
|
+
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
|
58
|
+
dts: "../../../../components"
|
|
59
|
+
}),
|
|
60
|
+
// https://github.com/antfu/unocss
|
|
61
|
+
// see unocss.config.ts for config
|
|
62
|
+
Unocss({
|
|
63
|
+
configFile: "../../ui/src/unocss.config.ts",
|
|
64
|
+
mode: "vue-scoped"
|
|
65
|
+
}),
|
|
66
|
+
// https://github.com/antfu/vite-plugin-vue-markdown
|
|
67
|
+
// Don't need this? Try vitesse-lite: https://github.com/antfu/vitesse-lite
|
|
68
|
+
Markdown({
|
|
69
|
+
wrapperClasses: "prose prose-sm m-auto text-left",
|
|
70
|
+
headEnabled: true,
|
|
71
|
+
markdownItSetup(md) {
|
|
72
|
+
md.use(Shiki, {
|
|
73
|
+
theme: {
|
|
74
|
+
light: "vitesse-light",
|
|
75
|
+
dark: "vitesse-dark"
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
md.use(LinkAttributes, {
|
|
79
|
+
matcher: (link) => /^https?:\/\//.test(link),
|
|
80
|
+
attrs: {
|
|
81
|
+
target: "_blank",
|
|
82
|
+
rel: "noopener"
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
}),
|
|
87
|
+
// https://github.com/antfu/vite-plugin-pwa
|
|
88
|
+
VitePWA({
|
|
89
|
+
registerType: "autoUpdate",
|
|
90
|
+
includeAssets: ["favicon.ico", "safari-pinned-tab.svg"],
|
|
91
|
+
manifest: {
|
|
92
|
+
name: "Vitesse",
|
|
93
|
+
short_name: "Vitesse",
|
|
94
|
+
theme_color: "#ffffff",
|
|
95
|
+
icons: [
|
|
96
|
+
{
|
|
97
|
+
src: "/pwa-192x192.png",
|
|
98
|
+
sizes: "192x192",
|
|
99
|
+
type: "image/png"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
src: "/pwa-512x512.png",
|
|
103
|
+
sizes: "512x512",
|
|
104
|
+
type: "image/png"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
src: "/pwa-512x512.png",
|
|
108
|
+
sizes: "512x512",
|
|
109
|
+
type: "image/png",
|
|
110
|
+
purpose: "any maskable"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
}),
|
|
115
|
+
// https://github.com/antfu/vite-plugin-inspect
|
|
116
|
+
// Visit http://localhost:3333/__inspect/ to see the inspector
|
|
117
|
+
Inspect()
|
|
11
118
|
],
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
119
|
+
// https://github.com/vitest-dev/vitest
|
|
120
|
+
test: {
|
|
121
|
+
include: ["test/**/*.test.ts"],
|
|
122
|
+
environment: "jsdom",
|
|
123
|
+
deps: {
|
|
124
|
+
inline: ["@vue", "@vueuse", "vue-demi"]
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
// https://github.com/antfu/vite-ssg
|
|
128
|
+
ssgOptions: {
|
|
129
|
+
script: "async",
|
|
130
|
+
formatting: "minify",
|
|
131
|
+
onFinished() {
|
|
132
|
+
generateSitemap();
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
ssr: {
|
|
136
|
+
// TODO: workaround until they support native ESM
|
|
137
|
+
noExternal: ["workbox-window", /vue-i18n/]
|
|
16
138
|
}
|
|
17
139
|
});
|
package/dist/stacks.d.ts
CHANGED
|
@@ -10,5 +10,5 @@ declare function autoImports(options?: AutoImportsOptions): any;
|
|
|
10
10
|
declare function cssEngine(isWebComponent?: boolean): import("vite").Plugin[];
|
|
11
11
|
declare function pwa(): import("vite").Plugin[];
|
|
12
12
|
declare function uiEngine(isWebComponent?: boolean): import("vite").Plugin;
|
|
13
|
-
declare
|
|
13
|
+
declare function componentPreset(isWebComponent?: boolean): PluginOption;
|
|
14
14
|
export { resolve, componentPreset, uiEngine, autoImports, cssEngine, components, inspect, markdown, pages, pwa, layouts };
|
package/dist/stacks.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import LinkAttributes from "markdown-it-link-attributes";
|
|
|
10
10
|
import Shiki from "markdown-it-shiki";
|
|
11
11
|
import { VitePWA } from "vite-plugin-pwa";
|
|
12
12
|
import { defu } from "defu";
|
|
13
|
-
import
|
|
13
|
+
import p, { resolve } from "@stacksjs/path";
|
|
14
14
|
function inspect(options) {
|
|
15
15
|
return Inspect(options);
|
|
16
16
|
}
|
|
@@ -23,10 +23,10 @@ function components(options) {
|
|
|
23
23
|
extensions: ["vue", "md"],
|
|
24
24
|
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
|
25
25
|
dirs: [
|
|
26
|
-
componentsPath()
|
|
26
|
+
p.componentsPath()
|
|
27
27
|
// pagesPath(),
|
|
28
28
|
],
|
|
29
|
-
dts: frameworkPath("components.d.ts")
|
|
29
|
+
dts: p.frameworkPath("components.d.ts")
|
|
30
30
|
};
|
|
31
31
|
const newOptions = defu(options, defaultOptions);
|
|
32
32
|
return Components(newOptions);
|
|
@@ -35,7 +35,7 @@ function pages(options) {
|
|
|
35
35
|
const defaultOptions = {
|
|
36
36
|
extensions: ["vue", "md"],
|
|
37
37
|
dirs: [
|
|
38
|
-
pagesPath()
|
|
38
|
+
p.pagesPath()
|
|
39
39
|
]
|
|
40
40
|
};
|
|
41
41
|
const newOptions = defu(options, defaultOptions);
|
|
@@ -62,7 +62,6 @@ function markdown(options) {
|
|
|
62
62
|
return Markdown(newOptions);
|
|
63
63
|
}
|
|
64
64
|
function autoImports(options) {
|
|
65
|
-
console.log("autoImports here?");
|
|
66
65
|
const defaultOptions = {
|
|
67
66
|
imports: [
|
|
68
67
|
"vue",
|
|
@@ -71,22 +70,50 @@ function autoImports(options) {
|
|
|
71
70
|
"@vueuse/core",
|
|
72
71
|
"@vueuse/head",
|
|
73
72
|
"@vueuse/math",
|
|
74
|
-
"vitest"
|
|
75
|
-
|
|
73
|
+
"vitest",
|
|
74
|
+
{ "@vueuse/shared": ["isClient", "now", "timestamp", "clamp", "noop", "rand", "isIOS", "hasOwn"] }
|
|
76
75
|
],
|
|
77
76
|
dirs: [
|
|
78
|
-
functionsPath(),
|
|
79
|
-
componentsPath()
|
|
80
|
-
|
|
77
|
+
p.functionsPath(),
|
|
78
|
+
p.componentsPath(),
|
|
79
|
+
p.projectPath("config"),
|
|
81
80
|
// auto imported utilities start here
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
81
|
+
p.aiPath("src"),
|
|
82
|
+
p.arraysPath("src"),
|
|
83
|
+
p.authPath("src"),
|
|
84
|
+
p.authPath("src"),
|
|
85
|
+
p.cachePath("src"),
|
|
86
|
+
p.chatPath("src"),
|
|
87
|
+
p.collectionsPath("src"),
|
|
88
|
+
p.databasePath("src"),
|
|
89
|
+
p.desktopPath("src"),
|
|
90
|
+
p.emailPath("src"),
|
|
91
|
+
p.errorHandlingPath("src"),
|
|
92
|
+
p.eventsPath("src"),
|
|
93
|
+
p.healthPath("src"),
|
|
94
|
+
p.lintPath("src"),
|
|
95
|
+
p.loggingPath("src"),
|
|
96
|
+
p.notificationsPath("src"),
|
|
97
|
+
p.objectsPath("src"),
|
|
98
|
+
p.pathPath("src"),
|
|
99
|
+
p.paymentsPath("src"),
|
|
100
|
+
p.pushPath("src"),
|
|
101
|
+
p.queuePath("src"),
|
|
102
|
+
p.realtimePath("src"),
|
|
103
|
+
p.routerPath("src"),
|
|
104
|
+
p.searchEnginePath("src"),
|
|
105
|
+
p.securityPath("src"),
|
|
106
|
+
p.smsPath("src"),
|
|
107
|
+
p.storagePath("src"),
|
|
108
|
+
p.stringsPath("src"),
|
|
109
|
+
p.tablesPath("src"),
|
|
110
|
+
p.stringsPath("src"),
|
|
111
|
+
p.testingPath("src"),
|
|
112
|
+
p.uiPath("src"),
|
|
113
|
+
p.utilsPath("src"),
|
|
114
|
+
p.validationPath("src")
|
|
88
115
|
],
|
|
89
|
-
dts: frameworkPath("auto-imports.d.ts"),
|
|
116
|
+
dts: p.frameworkPath("auto-imports.d.ts"),
|
|
90
117
|
vueTemplate: true,
|
|
91
118
|
eslintrc: {
|
|
92
119
|
enabled: false
|
|
@@ -98,7 +125,7 @@ function autoImports(options) {
|
|
|
98
125
|
}
|
|
99
126
|
function cssEngine(isWebComponent = false) {
|
|
100
127
|
return Unocss({
|
|
101
|
-
configFile: uiPath("src/unocss.ts"),
|
|
128
|
+
configFile: p.uiPath("src/unocss.ts"),
|
|
102
129
|
mode: isWebComponent ? "shadow-dom" : "vue-scoped"
|
|
103
130
|
});
|
|
104
131
|
}
|
|
@@ -132,7 +159,6 @@ function pwa() {
|
|
|
132
159
|
});
|
|
133
160
|
}
|
|
134
161
|
function uiEngine(isWebComponent = false) {
|
|
135
|
-
console.log("here", isWebComponent, process.cwd(), __dirname, __filename);
|
|
136
162
|
if (isWebComponent) {
|
|
137
163
|
return Vue({
|
|
138
164
|
include: [/\.vue$/, /\.md$/],
|
|
@@ -147,12 +173,14 @@ function uiEngine(isWebComponent = false) {
|
|
|
147
173
|
include: [/\.vue$/, /\.md$/]
|
|
148
174
|
});
|
|
149
175
|
}
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
176
|
+
function componentPreset(isWebComponent = false) {
|
|
177
|
+
return [
|
|
178
|
+
inspect,
|
|
179
|
+
uiEngine(isWebComponent),
|
|
180
|
+
cssEngine(isWebComponent),
|
|
181
|
+
autoImports,
|
|
182
|
+
components,
|
|
183
|
+
markdown
|
|
184
|
+
];
|
|
185
|
+
}
|
|
158
186
|
export { resolve, componentPreset, uiEngine, autoImports, cssEngine, components, inspect, markdown, pages, pwa, layouts };
|
package/dist/vue-components.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { defineConfig } from "vite";
|
|
2
|
-
import { buildEntriesPath,
|
|
2
|
+
import { buildEntriesPath, frameworkPath, projectPath } from "@stacksjs/path";
|
|
3
|
+
import { library } from "@stacksjs/config";
|
|
3
4
|
import { server } from "@stacksjs/server";
|
|
4
5
|
import { alias } from "@stacksjs/alias";
|
|
5
|
-
import { autoImports, components, cssEngine, inspect, uiEngine } from "./
|
|
6
|
-
console.log("componentsPath()", componentsPath());
|
|
6
|
+
import { autoImports, components, cssEngine, inspect, uiEngine } from "./stacks.mjs";
|
|
7
7
|
export const vueComponentsConfig = {
|
|
8
8
|
root: frameworkPath("components/vue"),
|
|
9
9
|
envDir: projectPath(),
|
|
@@ -32,8 +32,7 @@ export function vueComponentsBuildOptions() {
|
|
|
32
32
|
emptyOutDir: true,
|
|
33
33
|
lib: {
|
|
34
34
|
entry: buildEntriesPath("vue-components.ts"),
|
|
35
|
-
|
|
36
|
-
name: "test",
|
|
35
|
+
name: library.vueComponents.name,
|
|
37
36
|
formats: ["cjs", "es"],
|
|
38
37
|
fileName: (format) => {
|
|
39
38
|
if (format === "es")
|
|
@@ -54,7 +53,6 @@ export function vueComponentsBuildOptions() {
|
|
|
54
53
|
};
|
|
55
54
|
}
|
|
56
55
|
export default defineConfig(({ command }) => {
|
|
57
|
-
console.log("command", command);
|
|
58
56
|
if (command === "serve")
|
|
59
57
|
return vueComponentsConfig;
|
|
60
58
|
return vueComponentsConfig;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/build",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@
|
|
4
|
+
"version": "0.52.0",
|
|
5
|
+
"packageManager": "pnpm@8.5.1",
|
|
6
6
|
"description": "The Stacks framework build tools and configurations.",
|
|
7
7
|
"author": "Chris Breuer",
|
|
8
8
|
"license": "MIT",
|
|
@@ -26,6 +26,14 @@
|
|
|
26
26
|
"nitro",
|
|
27
27
|
"vue"
|
|
28
28
|
],
|
|
29
|
+
"exports": {
|
|
30
|
+
".": {
|
|
31
|
+
"types": "./dist/index.d.ts",
|
|
32
|
+
"import": "./dist/index.mjs"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"module": "dist/index.mjs",
|
|
36
|
+
"types": "dist/index.d.ts",
|
|
29
37
|
"contributors": [
|
|
30
38
|
"Chris Breuer <chris@ow3.org>"
|
|
31
39
|
],
|
|
@@ -33,41 +41,35 @@
|
|
|
33
41
|
"dist",
|
|
34
42
|
"README.md"
|
|
35
43
|
],
|
|
36
|
-
"engines": {
|
|
37
|
-
"node": ">=v18.13.0",
|
|
38
|
-
"pnpm": ">=7.25.1"
|
|
39
|
-
},
|
|
40
44
|
"peerDependencies": {
|
|
41
|
-
"@vitejs/plugin-vue": "^4.
|
|
45
|
+
"@vitejs/plugin-vue": "^4.2.3",
|
|
42
46
|
"markdown-it-link-attributes": "^4.0.1",
|
|
43
|
-
"markdown-it-shiki": "^0.
|
|
44
|
-
"unbuild": "^1.
|
|
45
|
-
"unplugin-auto-import": "^0.
|
|
46
|
-
"unplugin-vue-components": "^0.
|
|
47
|
-
"vite": "^4.
|
|
48
|
-
"vite-plugin-inspect": "^0.7.
|
|
49
|
-
"vite-plugin-pages": "^0.
|
|
50
|
-
"vite-plugin-pwa": "^0.14.
|
|
51
|
-
"vite-plugin-vue-layouts": "^0.
|
|
52
|
-
"vite-plugin-vue-markdown": "^0.
|
|
53
|
-
"vite-ssg": "^0.22.
|
|
54
|
-
"vite-ssg-sitemap": "^0.
|
|
47
|
+
"markdown-it-shiki": "^0.9.0",
|
|
48
|
+
"unbuild": "^1.2.1",
|
|
49
|
+
"unplugin-auto-import": "^0.16.0",
|
|
50
|
+
"unplugin-vue-components": "^0.24.1",
|
|
51
|
+
"vite": "^4.3.7",
|
|
52
|
+
"vite-plugin-inspect": "^0.7.26",
|
|
53
|
+
"vite-plugin-pages": "^0.29.0",
|
|
54
|
+
"vite-plugin-pwa": "^0.14.7",
|
|
55
|
+
"vite-plugin-vue-layouts": "^0.8.0",
|
|
56
|
+
"vite-plugin-vue-markdown": "^0.23.4",
|
|
57
|
+
"vite-ssg": "^0.22.2",
|
|
58
|
+
"vite-ssg-sitemap": "^0.5.1",
|
|
55
59
|
"vue-docgen-web-types": "^0.1.8",
|
|
56
|
-
"@stacksjs/alias": "0.
|
|
57
|
-
"@stacksjs/config": "0.
|
|
58
|
-
"@stacksjs/path": "0.
|
|
59
|
-
"@stacksjs/server": "0.
|
|
60
|
-
"@stacksjs/types": "0.
|
|
61
|
-
"@stacksjs/utils": "0.
|
|
60
|
+
"@stacksjs/alias": "0.52.0",
|
|
61
|
+
"@stacksjs/config": "0.52.0",
|
|
62
|
+
"@stacksjs/path": "0.52.0",
|
|
63
|
+
"@stacksjs/server": "0.52.0",
|
|
64
|
+
"@stacksjs/types": "0.52.0",
|
|
65
|
+
"@stacksjs/utils": "0.52.0"
|
|
62
66
|
},
|
|
63
67
|
"devDependencies": {
|
|
64
|
-
"
|
|
65
|
-
"typescript": "^4.9.4",
|
|
66
|
-
"@stacksjs/testing": "0.50.0"
|
|
68
|
+
"@stacksjs/development": "0.52.0"
|
|
67
69
|
},
|
|
68
70
|
"scripts": {
|
|
69
|
-
"build": "
|
|
70
|
-
"dev": "
|
|
71
|
+
"build": "unbuild",
|
|
72
|
+
"dev": "unbuild --stub",
|
|
71
73
|
"typecheck": "tsc --noEmit"
|
|
72
74
|
}
|
|
73
75
|
}
|