@stacksjs/build 0.57.4 โ 0.58.19
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 +4 -4
- package/dist/index.js +19 -0
- package/package.json +26 -39
- package/LICENSE.md +0 -21
- package/dist/desktop.d.ts +0 -2
- package/dist/desktop.mjs +0 -139
- package/dist/example-vue.d.ts +0 -4
- package/dist/example-vue.mjs +0 -17
- package/dist/example-wc.d.ts +0 -4
- package/dist/example-wc.mjs +0 -17
- package/dist/functions.d.ts +0 -6
- package/dist/functions.mjs +0 -40
- package/dist/index.d.ts +0 -7
- package/dist/index.mjs +0 -7
- package/dist/stacks.d.ts +0 -12
- package/dist/stacks.mjs +0 -159
- package/dist/views.d.ts +0 -4
- package/dist/views.mjs +0 -38
- package/dist/vue-components.d.ts +0 -6
- package/dist/vue-components.mjs +0 -96
- package/dist/web-components.d.ts +0 -6
- package/dist/web-components.mjs +0 -45
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ wip
|
|
|
15
15
|
wip
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
|
|
18
|
+
bun install -d @stacksjs/actions
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
Now, you can use it in your project:
|
|
@@ -31,7 +31,7 @@ Learn more in the docs.
|
|
|
31
31
|
## ๐งช Testing
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
|
|
34
|
+
bun test
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
## ๐ Changelog
|
|
@@ -50,10 +50,10 @@ For help, discussion about best practices, or any other conversation that would
|
|
|
50
50
|
|
|
51
51
|
For casual chit-chat with others using this package:
|
|
52
52
|
|
|
53
|
-
[Join the Stacks Discord Server](https://discord.
|
|
53
|
+
[Join the Stacks Discord Server](https://discord.gg/stacksjs)
|
|
54
54
|
|
|
55
55
|
## ๐ License
|
|
56
56
|
|
|
57
57
|
The MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.
|
|
58
58
|
|
|
59
|
-
Made with
|
|
59
|
+
Made with ๐
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/index.ts
|
|
2
|
+
import {
|
|
3
|
+
vueComponentExample,
|
|
4
|
+
webComponentExample,
|
|
5
|
+
functions,
|
|
6
|
+
views,
|
|
7
|
+
vueComponents,
|
|
8
|
+
webComponents,
|
|
9
|
+
stacks
|
|
10
|
+
} from "@stacksjs/vite";
|
|
11
|
+
export {
|
|
12
|
+
webComponents,
|
|
13
|
+
webComponentExample,
|
|
14
|
+
vueComponents,
|
|
15
|
+
vueComponentExample,
|
|
16
|
+
views,
|
|
17
|
+
stacks,
|
|
18
|
+
functions
|
|
19
|
+
};
|
package/package.json
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stacksjs/build",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@8.6.6",
|
|
4
|
+
"version": "0.58.19",
|
|
6
5
|
"description": "The Stacks framework build tools and configurations.",
|
|
7
6
|
"author": "Chris Breuer",
|
|
8
7
|
"license": "MIT",
|
|
9
8
|
"funding": "https://github.com/sponsors/chrisbbreuer",
|
|
10
|
-
"homepage": "https://github.com/stacksjs/stacks/tree/main
|
|
9
|
+
"homepage": "https://github.com/stacksjs/stacks/tree/main/storage/framework/core/src/build#readme",
|
|
11
10
|
"repository": {
|
|
12
11
|
"type": "git",
|
|
13
12
|
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
14
|
-
"directory": "
|
|
13
|
+
"directory": "./storage/framework/core/src/build"
|
|
15
14
|
},
|
|
16
15
|
"bugs": {
|
|
17
16
|
"url": "https://github.com/stacksjs/stacks/issues"
|
|
@@ -28,49 +27,37 @@
|
|
|
28
27
|
],
|
|
29
28
|
"exports": {
|
|
30
29
|
".": {
|
|
31
|
-
"
|
|
32
|
-
"import": "./dist/index.
|
|
30
|
+
"bun": "./src/index.ts",
|
|
31
|
+
"import": "./dist/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./*": {
|
|
34
|
+
"bun": "./src/*",
|
|
35
|
+
"import": "./dist/*"
|
|
33
36
|
}
|
|
34
37
|
},
|
|
35
|
-
"module": "dist/index.
|
|
38
|
+
"module": "dist/index.js",
|
|
36
39
|
"types": "dist/index.d.ts",
|
|
37
40
|
"contributors": [
|
|
38
|
-
"Chris Breuer <chris@
|
|
41
|
+
"Chris Breuer <chris@stacksjs.org>"
|
|
39
42
|
],
|
|
40
43
|
"files": [
|
|
41
|
-
"
|
|
42
|
-
"
|
|
44
|
+
"README.md",
|
|
45
|
+
"dist"
|
|
43
46
|
],
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "bun --bun build.ts",
|
|
49
|
+
"typecheck": "bun --bun tsc --noEmit",
|
|
50
|
+
"prepublishOnly": "bun --bun run build"
|
|
51
|
+
},
|
|
44
52
|
"peerDependencies": {
|
|
45
|
-
"@
|
|
46
|
-
"
|
|
47
|
-
"markdown-it-shiki": "^0.9.0",
|
|
48
|
-
"unbuild": "^1.2.1",
|
|
49
|
-
"unplugin-auto-import": "^0.16.4",
|
|
50
|
-
"unplugin-vue-components": "^0.25.1",
|
|
51
|
-
"vite": "^4.3.9",
|
|
52
|
-
"vite-plugin-inspect": "^0.7.32",
|
|
53
|
-
"vite-plugin-pages": "^0.31.0",
|
|
54
|
-
"vite-plugin-pwa": "^0.16.4",
|
|
55
|
-
"vite-plugin-vue-layouts": "^0.8.0",
|
|
56
|
-
"vite-plugin-vue-markdown": "^0.23.5",
|
|
57
|
-
"vite-ssg": "^0.23.0",
|
|
58
|
-
"vite-ssg-sitemap": "^0.5.1",
|
|
59
|
-
"vue-docgen-web-types": "^0.1.8",
|
|
60
|
-
"@stacksjs/alias": "0.57.4",
|
|
61
|
-
"@stacksjs/config": "0.57.4",
|
|
62
|
-
"@stacksjs/path": "0.57.4",
|
|
63
|
-
"@stacksjs/server": "0.57.4",
|
|
64
|
-
"@stacksjs/types": "0.57.4",
|
|
65
|
-
"@stacksjs/utils": "0.57.4"
|
|
53
|
+
"@stacksjs/vite": "workspace:*",
|
|
54
|
+
"vue-docgen-web-types": "^0.1.8"
|
|
66
55
|
},
|
|
67
|
-
"
|
|
68
|
-
"vite
|
|
69
|
-
"
|
|
56
|
+
"dependencies": {
|
|
57
|
+
"@stacksjs/vite": "workspace:*",
|
|
58
|
+
"vue-docgen-web-types": "^0.1.8"
|
|
70
59
|
},
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"dev": "unbuild --stub",
|
|
74
|
-
"typecheck": "tsc --noEmit"
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@stacksjs/development": "workspace:*"
|
|
75
62
|
}
|
|
76
|
-
}
|
|
63
|
+
}
|
package/LICENSE.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 Open Web Foundation
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/dist/desktop.d.ts
DELETED
package/dist/desktop.mjs
DELETED
|
@@ -1,139 +0,0 @@
|
|
|
1
|
-
import path from "node:path";
|
|
2
|
-
import { defineConfig } from "vite";
|
|
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";
|
|
14
|
-
export default defineConfig({
|
|
15
|
-
resolve: {
|
|
16
|
-
alias: {
|
|
17
|
-
"~/": `${path.resolve(__dirname, "../../../../")}/`
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
clearScreen: false,
|
|
21
|
-
server: {
|
|
22
|
-
port: 3333,
|
|
23
|
-
strictPort: true
|
|
24
|
-
},
|
|
25
|
-
envPrefix: [""],
|
|
26
|
-
plugins: [
|
|
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
|
-
projectPath("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()
|
|
118
|
-
],
|
|
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/]
|
|
138
|
-
}
|
|
139
|
-
});
|
package/dist/example-vue.d.ts
DELETED
package/dist/example-vue.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite";
|
|
2
|
-
import { examplesPath } from "@stacksjs/path";
|
|
3
|
-
import { server } from "@stacksjs/server";
|
|
4
|
-
import { alias } from "@stacksjs/alias";
|
|
5
|
-
export const vueComponentsExampleConfig = {
|
|
6
|
-
root: examplesPath("vue-components"),
|
|
7
|
-
resolve: {
|
|
8
|
-
alias
|
|
9
|
-
},
|
|
10
|
-
server
|
|
11
|
-
// plugins: [
|
|
12
|
-
// uiEngine(),
|
|
13
|
-
// ],
|
|
14
|
-
};
|
|
15
|
-
export default defineConfig(() => {
|
|
16
|
-
return vueComponentsExampleConfig;
|
|
17
|
-
});
|
package/dist/example-wc.d.ts
DELETED
package/dist/example-wc.mjs
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite";
|
|
2
|
-
import { examplesPath } from "@stacksjs/path";
|
|
3
|
-
import { server } from "@stacksjs/server";
|
|
4
|
-
import { alias } from "@stacksjs/alias";
|
|
5
|
-
export const webComponentsExampleConfig = {
|
|
6
|
-
root: examplesPath("web-components"),
|
|
7
|
-
resolve: {
|
|
8
|
-
alias
|
|
9
|
-
},
|
|
10
|
-
server
|
|
11
|
-
// plugins: [
|
|
12
|
-
// uiEngine(true),
|
|
13
|
-
// ],
|
|
14
|
-
};
|
|
15
|
-
export default defineConfig(() => {
|
|
16
|
-
return webComponentsExampleConfig;
|
|
17
|
-
});
|
package/dist/functions.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { BuildOptions as ViteBuildOptions } from 'vite';
|
|
2
|
-
import type { ViteConfig } from '@stacksjs/types';
|
|
3
|
-
export declare const functionsConfig: ViteConfig;
|
|
4
|
-
export declare function functionsBuildOptions(): ViteBuildOptions;
|
|
5
|
-
declare const _default: import("vite").UserConfigExport;
|
|
6
|
-
export default _default;
|
package/dist/functions.mjs
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite";
|
|
2
|
-
import { frameworkPath, functionsPath, libraryEntryPath, projectPath } from "@stacksjs/path";
|
|
3
|
-
import { library } from "@stacksjs/config";
|
|
4
|
-
import { alias } from "@stacksjs/alias";
|
|
5
|
-
export const functionsConfig = {
|
|
6
|
-
root: functionsPath(),
|
|
7
|
-
envDir: projectPath(),
|
|
8
|
-
envPrefix: "",
|
|
9
|
-
resolve: {
|
|
10
|
-
alias
|
|
11
|
-
},
|
|
12
|
-
// plugins: [
|
|
13
|
-
// autoImports(),
|
|
14
|
-
// ],
|
|
15
|
-
build: functionsBuildOptions()
|
|
16
|
-
};
|
|
17
|
-
export function functionsBuildOptions() {
|
|
18
|
-
return {
|
|
19
|
-
outDir: frameworkPath("functions/dist"),
|
|
20
|
-
emptyOutDir: true,
|
|
21
|
-
sourcemap: library.functions?.shouldGenerateSourcemap,
|
|
22
|
-
lib: {
|
|
23
|
-
entry: libraryEntryPath("functions"),
|
|
24
|
-
name: library.functions?.name,
|
|
25
|
-
formats: ["cjs", "es"],
|
|
26
|
-
fileName: (format) => {
|
|
27
|
-
if (format === "es")
|
|
28
|
-
return "index.mjs";
|
|
29
|
-
if (format === "cjs")
|
|
30
|
-
return "index.cjs";
|
|
31
|
-
return "index.?.js";
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export default defineConfig(({ command }) => {
|
|
37
|
-
if (command === "serve")
|
|
38
|
-
return functionsConfig;
|
|
39
|
-
return functionsConfig;
|
|
40
|
-
});
|
package/dist/index.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * as vueComponentExample from './example-vue';
|
|
2
|
-
export * as webComponentExample from './example-wc';
|
|
3
|
-
export * as functions from './functions';
|
|
4
|
-
export * as views from './views';
|
|
5
|
-
export * as vueComponents from './vue-components';
|
|
6
|
-
export * as webComponents from './web-components';
|
|
7
|
-
export * as stacks from './stacks';
|
package/dist/index.mjs
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
export * as vueComponentExample from "./example-vue.mjs";
|
|
2
|
-
export * as webComponentExample from "./example-wc.mjs";
|
|
3
|
-
export * as functions from "./functions.mjs";
|
|
4
|
-
export * as views from "./views.mjs";
|
|
5
|
-
export * as vueComponents from "./vue-components.mjs";
|
|
6
|
-
export * as webComponents from "./web-components.mjs";
|
|
7
|
-
export * as stacks from "./stacks.mjs";
|
package/dist/stacks.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { PluginOption } from 'vite';
|
|
2
|
-
import type { AutoImportsOptions, ComponentOptions, InspectOptions, PagesOption } from '@stacksjs/types';
|
|
3
|
-
import { resolve } from '@stacksjs/path';
|
|
4
|
-
export { resolve };
|
|
5
|
-
export declare function inspect(options?: InspectOptions): import("vite").Plugin;
|
|
6
|
-
export declare function components(options?: ComponentOptions): PluginOption;
|
|
7
|
-
export declare function pages(options?: PagesOption): import("vite").Plugin;
|
|
8
|
-
export declare function autoImports(options?: AutoImportsOptions): any;
|
|
9
|
-
export declare function cssEngine(isWebComponent?: boolean): import("vite").Plugin[];
|
|
10
|
-
export declare function pwa(): import("vite").Plugin[];
|
|
11
|
-
export declare function uiEngine(isWebComponent?: boolean): import("vite").Plugin;
|
|
12
|
-
export declare function componentPreset(isWebComponent?: boolean): (import("vite").Plugin | import("vite").Plugin[])[];
|
package/dist/stacks.mjs
DELETED
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import AutoImport from "unplugin-auto-import/vite";
|
|
2
|
-
import Components from "unplugin-vue-components/vite";
|
|
3
|
-
import Vue from "@vitejs/plugin-vue";
|
|
4
|
-
import Unocss from "unocss/vite";
|
|
5
|
-
import Inspect from "vite-plugin-inspect";
|
|
6
|
-
import Pages from "vite-plugin-pages";
|
|
7
|
-
import { VitePWA } from "vite-plugin-pwa";
|
|
8
|
-
import { defu } from "defu";
|
|
9
|
-
import { path as p, resolve } from "@stacksjs/path";
|
|
10
|
-
export { resolve };
|
|
11
|
-
export function inspect(options) {
|
|
12
|
-
return Inspect(options);
|
|
13
|
-
}
|
|
14
|
-
export function components(options) {
|
|
15
|
-
const defaultOptions = {
|
|
16
|
-
// also allow auto-loading markdown components
|
|
17
|
-
extensions: ["vue", "md"],
|
|
18
|
-
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
|
19
|
-
dirs: [
|
|
20
|
-
p.componentsPath()
|
|
21
|
-
// pagesPath(),
|
|
22
|
-
],
|
|
23
|
-
dts: p.frameworkPath("components.d.ts")
|
|
24
|
-
};
|
|
25
|
-
const newOptions = defu(options, defaultOptions);
|
|
26
|
-
return Components(newOptions);
|
|
27
|
-
}
|
|
28
|
-
export function pages(options) {
|
|
29
|
-
const defaultOptions = {
|
|
30
|
-
extensions: ["vue", "md"],
|
|
31
|
-
dirs: [
|
|
32
|
-
p.pagesPath()
|
|
33
|
-
]
|
|
34
|
-
};
|
|
35
|
-
const newOptions = defu(options, defaultOptions);
|
|
36
|
-
return Pages(newOptions);
|
|
37
|
-
}
|
|
38
|
-
export function autoImports(options) {
|
|
39
|
-
const defaultOptions = {
|
|
40
|
-
imports: [
|
|
41
|
-
"vue",
|
|
42
|
-
"vue-router",
|
|
43
|
-
"vue/macros",
|
|
44
|
-
"vitest",
|
|
45
|
-
{ "@stacksjs/ui": ["CssEngine", "UiEngine", "Store", "presetForms", "transformerCompileClass"] },
|
|
46
|
-
{ "@stacksjs/logging": ["dd", "dump"] }
|
|
47
|
-
// we also export `log` in st stacks/cli
|
|
48
|
-
// { '@stacksjs/validation': ['validate', 'validateAll', 'validateSync', 'validateAllSync'] },
|
|
49
|
-
],
|
|
50
|
-
dirs: [
|
|
51
|
-
p.resourcesPath("functions"),
|
|
52
|
-
p.resourcesPath("components"),
|
|
53
|
-
p.projectPath("config"),
|
|
54
|
-
// auto imported utilities start here
|
|
55
|
-
p.aiPath("src"),
|
|
56
|
-
p.arraysPath("src"),
|
|
57
|
-
p.authPath("src"),
|
|
58
|
-
p.cachePath("src"),
|
|
59
|
-
p.chatPath("src"),
|
|
60
|
-
p.cliPath("src"),
|
|
61
|
-
p.cloudPath("src"),
|
|
62
|
-
p.databasePath("src"),
|
|
63
|
-
p.datetimePath("src"),
|
|
64
|
-
p.desktopPath("src"),
|
|
65
|
-
p.errorHandlingPath("src"),
|
|
66
|
-
p.eventsPath("src"),
|
|
67
|
-
p.fakerPath("src"),
|
|
68
|
-
p.healthPath("src"),
|
|
69
|
-
p.lintPath("src"),
|
|
70
|
-
p.notificationsPath("src"),
|
|
71
|
-
p.objectsPath("src"),
|
|
72
|
-
p.ormPath("src"),
|
|
73
|
-
p.pathPath("src"),
|
|
74
|
-
p.paymentsPath("src"),
|
|
75
|
-
p.pushPath("src"),
|
|
76
|
-
p.queuePath("src"),
|
|
77
|
-
p.queryBuilderPath("src"),
|
|
78
|
-
p.realtimePath("src"),
|
|
79
|
-
p.routerPath("src"),
|
|
80
|
-
p.searchEnginePath("src"),
|
|
81
|
-
p.securityPath("src"),
|
|
82
|
-
p.signalsPath("src"),
|
|
83
|
-
p.smsPath("src"),
|
|
84
|
-
p.slugPath("src"),
|
|
85
|
-
p.storagePath("src"),
|
|
86
|
-
p.stringsPath("src"),
|
|
87
|
-
p.testingPath("src"),
|
|
88
|
-
p.utilsPath("src"),
|
|
89
|
-
p.validationPath("src")
|
|
90
|
-
],
|
|
91
|
-
dts: p.frameworkPath("auto-imports.d.ts"),
|
|
92
|
-
vueTemplate: true,
|
|
93
|
-
eslintrc: {
|
|
94
|
-
enabled: false
|
|
95
|
-
// filepath: frameworkPath('.eslintrc-auto-import.json'),
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
const newOptions = defu(options, defaultOptions);
|
|
99
|
-
return AutoImport(newOptions);
|
|
100
|
-
}
|
|
101
|
-
export function cssEngine(isWebComponent = false) {
|
|
102
|
-
return Unocss({
|
|
103
|
-
configFile: p.uiPath("src/unocss.ts"),
|
|
104
|
-
mode: isWebComponent ? "shadow-dom" : "vue-scoped"
|
|
105
|
-
});
|
|
106
|
-
}
|
|
107
|
-
export function pwa() {
|
|
108
|
-
return VitePWA({
|
|
109
|
-
registerType: "autoUpdate",
|
|
110
|
-
includeAssets: ["favicon.svg", "safari-pinned-tab.svg"],
|
|
111
|
-
manifest: {
|
|
112
|
-
name: "Stacks",
|
|
113
|
-
short_name: "Stacks",
|
|
114
|
-
theme_color: "#ffffff",
|
|
115
|
-
icons: [
|
|
116
|
-
{
|
|
117
|
-
src: "/pwa-192x192.png",
|
|
118
|
-
sizes: "192x192",
|
|
119
|
-
type: "image/png"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
src: "/pwa-512x512.png",
|
|
123
|
-
sizes: "512x512",
|
|
124
|
-
type: "image/png"
|
|
125
|
-
},
|
|
126
|
-
{
|
|
127
|
-
src: "/pwa-512x512.png",
|
|
128
|
-
sizes: "512x512",
|
|
129
|
-
type: "image/png",
|
|
130
|
-
purpose: "any maskable"
|
|
131
|
-
}
|
|
132
|
-
]
|
|
133
|
-
}
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
export function uiEngine(isWebComponent = false) {
|
|
137
|
-
if (isWebComponent) {
|
|
138
|
-
return Vue({
|
|
139
|
-
include: [/\.vue$/, /\.md$/],
|
|
140
|
-
template: {
|
|
141
|
-
compilerOptions: {
|
|
142
|
-
isCustomElement: () => true
|
|
143
|
-
}
|
|
144
|
-
}
|
|
145
|
-
});
|
|
146
|
-
}
|
|
147
|
-
return Vue({
|
|
148
|
-
include: [/\.vue$/, /\.md$/]
|
|
149
|
-
});
|
|
150
|
-
}
|
|
151
|
-
export function componentPreset(isWebComponent = false) {
|
|
152
|
-
return [
|
|
153
|
-
// inspect,
|
|
154
|
-
uiEngine(isWebComponent),
|
|
155
|
-
cssEngine(isWebComponent)
|
|
156
|
-
// autoImports,
|
|
157
|
-
// components,
|
|
158
|
-
];
|
|
159
|
-
}
|
package/dist/views.d.ts
DELETED
package/dist/views.mjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite";
|
|
2
|
-
import { functionsPath, projectPath } from "@stacksjs/path";
|
|
3
|
-
import { alias } from "@stacksjs/alias";
|
|
4
|
-
export const pagesConfig = {
|
|
5
|
-
root: functionsPath(),
|
|
6
|
-
envDir: projectPath(),
|
|
7
|
-
envPrefix: "FRONTEND_",
|
|
8
|
-
resolve: {
|
|
9
|
-
alias
|
|
10
|
-
},
|
|
11
|
-
plugins: [
|
|
12
|
-
// preview(),
|
|
13
|
-
// uiEngine(),
|
|
14
|
-
// pages(),
|
|
15
|
-
// cssEngine(),
|
|
16
|
-
// components(),
|
|
17
|
-
// layouts(),
|
|
18
|
-
// // i18n(),
|
|
19
|
-
// autoImports(),
|
|
20
|
-
// pwa(),
|
|
21
|
-
// inspect(),
|
|
22
|
-
],
|
|
23
|
-
// https://github.com/antfu/vite-ssg
|
|
24
|
-
// ssgOptions: {
|
|
25
|
-
// script: 'async',
|
|
26
|
-
// formatting: 'minify',
|
|
27
|
-
// onFinished() { generateSitemap() },
|
|
28
|
-
// },
|
|
29
|
-
ssr: {
|
|
30
|
-
// TODO: workaround until they support native ESM
|
|
31
|
-
noExternal: ["workbox-window", /vue-i18n/]
|
|
32
|
-
}
|
|
33
|
-
};
|
|
34
|
-
export default defineConfig(({ command }) => {
|
|
35
|
-
if (command === "serve")
|
|
36
|
-
return pagesConfig;
|
|
37
|
-
return pagesConfig;
|
|
38
|
-
});
|
package/dist/vue-components.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ViteConfig } from '@stacksjs/types';
|
|
2
|
-
import type { BuildOptions as ViteBuildOptions } from 'vite';
|
|
3
|
-
export declare const vueComponentsConfig: ViteConfig;
|
|
4
|
-
export declare function vueComponentsBuildOptions(): ViteBuildOptions;
|
|
5
|
-
declare const _default: import("vite").UserConfigExport;
|
|
6
|
-
export default _default;
|
package/dist/vue-components.mjs
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { defineConfig, loadEnv } from "vite";
|
|
2
|
-
import { frameworkPath, libraryEntryPath, libsPath, projectPath, storagePath } from "@stacksjs/path";
|
|
3
|
-
import { app, library } from "@stacksjs/config";
|
|
4
|
-
import { alias } from "@stacksjs/alias";
|
|
5
|
-
import mkcert from "vite-plugin-mkcert";
|
|
6
|
-
import c from "picocolors";
|
|
7
|
-
import { autoImports, components, cssEngine, inspect, uiEngine } from "./stacks.mjs";
|
|
8
|
-
export const vueComponentsConfig = {
|
|
9
|
-
root: frameworkPath("libs/components/vue"),
|
|
10
|
-
base: frameworkPath(),
|
|
11
|
-
envDir: projectPath(),
|
|
12
|
-
envPrefix: "FRONTEND_",
|
|
13
|
-
publicDir: storagePath("public"),
|
|
14
|
-
server: {
|
|
15
|
-
https: true,
|
|
16
|
-
port: 3333,
|
|
17
|
-
open: true
|
|
18
|
-
},
|
|
19
|
-
resolve: {
|
|
20
|
-
dedupe: ["vue"],
|
|
21
|
-
alias
|
|
22
|
-
},
|
|
23
|
-
optimizeDeps: {
|
|
24
|
-
exclude: ["vue", "fsevents"]
|
|
25
|
-
},
|
|
26
|
-
plugins: [
|
|
27
|
-
// preview(),
|
|
28
|
-
uiEngine(),
|
|
29
|
-
cssEngine(),
|
|
30
|
-
autoImports(),
|
|
31
|
-
components(),
|
|
32
|
-
inspect(),
|
|
33
|
-
mkcert({
|
|
34
|
-
autoUpgrade: true,
|
|
35
|
-
savePath: libsPath("components/certs"),
|
|
36
|
-
keyFileName: library.name ? `library-${library.name}-key.pem` : "library-key.pem",
|
|
37
|
-
certFileName: library.name ? `library-${library.name}-cert.pem` : "library-cert.pem"
|
|
38
|
-
}),
|
|
39
|
-
{
|
|
40
|
-
// ...
|
|
41
|
-
configureServer(server) {
|
|
42
|
-
server.printUrls = () => {
|
|
43
|
-
const appUrl = app.url;
|
|
44
|
-
const frontendUrl = `https://${appUrl}`;
|
|
45
|
-
const backendUrl = `https://api.${appUrl}`;
|
|
46
|
-
const dashboardUrl = `https://admin.${appUrl}`;
|
|
47
|
-
const libraryUrl = `https://libs.${appUrl}`;
|
|
48
|
-
const docsUrl = `https://docs.${appUrl}`;
|
|
49
|
-
const inspectUrl = `https://${appUrl}/__inspect/`;
|
|
50
|
-
const stacksVersion = "alpha-0.x.x";
|
|
51
|
-
console.log(` ${c.blue(c.bold("STACKS"))} ${c.blue(stacksVersion)}`);
|
|
52
|
-
console.log(` ${c.green("\u279C")} ${c.bold("Frontend")}: ${c.green(frontendUrl)}`);
|
|
53
|
-
console.log(` ${c.green("\u279C")} ${c.bold("Backend")}: ${c.green(backendUrl)}`);
|
|
54
|
-
console.log(` ${c.green("\u279C")} ${c.bold("Dashboard")}: ${c.green(dashboardUrl)}`);
|
|
55
|
-
console.log(` ${c.green("\u279C")} ${c.bold("Library")}: ${c.green(libraryUrl)}`);
|
|
56
|
-
console.log(` ${c.green("\u279C")} ${c.bold("Docs")}: ${c.green(docsUrl)}`);
|
|
57
|
-
console.log(` ${c.green("\u279C")} ${c.dim("Inspect")}: ${c.green(inspectUrl)}`);
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
|
-
build: vueComponentsBuildOptions()
|
|
63
|
-
};
|
|
64
|
-
export function vueComponentsBuildOptions() {
|
|
65
|
-
return {
|
|
66
|
-
target: "esnext",
|
|
67
|
-
outDir: libsPath("components/vue/dist"),
|
|
68
|
-
emptyOutDir: true,
|
|
69
|
-
lib: {
|
|
70
|
-
entry: libraryEntryPath("vue-components"),
|
|
71
|
-
name: library.vueComponents?.name,
|
|
72
|
-
formats: ["cjs", "es"],
|
|
73
|
-
fileName: (format) => {
|
|
74
|
-
if (format === "es")
|
|
75
|
-
return "index.mjs";
|
|
76
|
-
if (format === "cjs")
|
|
77
|
-
return "index.cjs";
|
|
78
|
-
return "index.?.js";
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
rollupOptions: {
|
|
82
|
-
external: ["vue", "@stacksjs/alias"],
|
|
83
|
-
output: {
|
|
84
|
-
globals: {
|
|
85
|
-
vue: "Vue"
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
export default defineConfig(({ command, mode }) => {
|
|
92
|
-
process.env = { ...process.env, ...loadEnv(mode, projectPath(), "") };
|
|
93
|
-
if (command === "serve")
|
|
94
|
-
return vueComponentsConfig;
|
|
95
|
-
return vueComponentsConfig;
|
|
96
|
-
});
|
package/dist/web-components.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { BuildOptions as ViteBuildOptions } from 'vite';
|
|
2
|
-
import type { ViteConfig } from '@stacksjs/types';
|
|
3
|
-
export declare const webComponentsConfig: ViteConfig;
|
|
4
|
-
export declare function webComponentsBuildOptions(): ViteBuildOptions;
|
|
5
|
-
declare const _default: import("vite").UserConfigExport;
|
|
6
|
-
export default _default;
|
package/dist/web-components.mjs
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite";
|
|
2
|
-
import { frameworkPath, libraryEntryPath, projectPath } from "@stacksjs/path";
|
|
3
|
-
import { library } from "@stacksjs/config";
|
|
4
|
-
import { server } from "@stacksjs/server";
|
|
5
|
-
import { alias } from "@stacksjs/alias";
|
|
6
|
-
export const webComponentsConfig = {
|
|
7
|
-
root: frameworkPath("libs/components/web"),
|
|
8
|
-
envDir: projectPath(),
|
|
9
|
-
envPrefix: "FRONTEND_",
|
|
10
|
-
server,
|
|
11
|
-
resolve: {
|
|
12
|
-
alias
|
|
13
|
-
},
|
|
14
|
-
plugins: [
|
|
15
|
-
// inspect(),
|
|
16
|
-
// uiEngine(isWebComponent),
|
|
17
|
-
// cssEngine(isWebComponent),
|
|
18
|
-
// autoImports(),
|
|
19
|
-
// components(),
|
|
20
|
-
],
|
|
21
|
-
build: webComponentsBuildOptions()
|
|
22
|
-
};
|
|
23
|
-
export function webComponentsBuildOptions() {
|
|
24
|
-
return {
|
|
25
|
-
outDir: frameworkPath("components/web/dist"),
|
|
26
|
-
emptyOutDir: true,
|
|
27
|
-
lib: {
|
|
28
|
-
entry: libraryEntryPath("web-components"),
|
|
29
|
-
name: library.webComponents?.name,
|
|
30
|
-
formats: ["cjs", "es"],
|
|
31
|
-
fileName: (format) => {
|
|
32
|
-
if (format === "es")
|
|
33
|
-
return "index.mjs";
|
|
34
|
-
if (format === "cjs")
|
|
35
|
-
return "index.cjs";
|
|
36
|
-
return "index.?.js";
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
}
|
|
41
|
-
export default defineConfig(({ command }) => {
|
|
42
|
-
if (command === "serve")
|
|
43
|
-
return webComponentsConfig;
|
|
44
|
-
return webComponentsConfig;
|
|
45
|
-
});
|