stacks 0.49.3 → 0.51.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 +2 -2
- package/auto-imports.d.ts +474 -50
- package/buddy/README.md +2 -2
- package/buddy/node_modules/.bin/tsc +2 -2
- package/buddy/node_modules/.bin/tsserver +2 -2
- package/buddy/package.json +5 -5
- package/buddy/src/cli.ts +1 -1
- package/buddy/src/commands/add.ts +4 -0
- package/buddy/src/commands/build.ts +13 -1
- package/buddy/src/commands/changelog.ts +2 -0
- package/buddy/src/commands/clean.ts +2 -0
- package/buddy/src/commands/commit.ts +2 -0
- package/buddy/src/commands/create.ts +2 -0
- package/buddy/src/commands/dev.ts +9 -3
- package/buddy/src/commands/example.ts +6 -2
- package/buddy/src/commands/fresh.ts +2 -0
- package/buddy/src/commands/generate.ts +9 -0
- package/buddy/src/commands/index.ts +2 -0
- package/buddy/src/commands/key.ts +2 -0
- package/buddy/src/commands/lint.ts +3 -0
- package/buddy/src/commands/make.ts +11 -0
- package/buddy/src/commands/onboarding.ts +28 -0
- package/buddy/src/commands/preinstall.ts +2 -0
- package/buddy/src/commands/prepublish.ts +2 -0
- package/buddy/src/commands/release.ts +2 -2
- package/buddy/src/commands/setting.ts +28 -0
- package/buddy/src/commands/setup.ts +3 -0
- package/buddy/src/commands/test.ts +13 -8
- package/buddy/src/commands/types.ts +3 -0
- package/buddy/src/commands/update.ts +12 -5
- package/components/vue/package.json +1 -1
- package/components/web/package.json +1 -1
- package/core/actions/node_modules/.bin/mkdist +2 -2
- package/core/actions/node_modules/.bin/tsc +2 -2
- package/core/actions/node_modules/.bin/tsserver +2 -2
- package/core/actions/package.json +6 -5
- package/core/actions/src/build-component-libs.ts +1 -1
- package/core/actions/src/build-core.ts +1 -1
- package/core/actions/src/build-stacks.ts +1 -1
- package/core/actions/src/bump.ts +1 -1
- package/core/actions/src/changelog.ts +1 -1
- package/core/actions/src/dev-components.ts +1 -1
- package/core/actions/src/fix-lint-issues.ts +1 -1
- package/core/actions/src/fresh.ts +1 -1
- package/core/actions/src/generate-onboarding.ts +3 -0
- package/core/actions/src/generate-settings.ts +4 -0
- package/core/actions/src/generate.ts +4 -4
- package/core/actions/src/lint.ts +1 -1
- package/core/actions/src/prepublish.ts +1 -1
- package/core/actions/src/release.ts +1 -1
- package/core/actions/src/test-coverage.ts +1 -1
- package/core/actions/src/test-feature.ts +1 -1
- package/core/actions/src/test-ui.ts +1 -1
- package/core/actions/src/test-unit.ts +1 -1
- package/core/actions/src/test.ts +1 -1
- package/core/actions/src/typecheck.ts +1 -1
- package/core/ai/node_modules/.bin/mkdist +2 -2
- package/core/ai/node_modules/.bin/tsc +2 -2
- package/core/ai/node_modules/.bin/tsserver +2 -2
- package/core/ai/package.json +5 -5
- package/core/alias/node_modules/.bin/mkdist +2 -2
- package/core/alias/node_modules/.bin/tsc +2 -2
- package/core/alias/node_modules/.bin/tsserver +2 -2
- package/core/alias/package.json +5 -5
- package/core/alias/src/index.ts +4 -4
- package/core/arrays/node_modules/.bin/mkdist +2 -2
- package/core/arrays/node_modules/.bin/tsc +2 -2
- package/core/arrays/node_modules/.bin/tsserver +2 -2
- package/core/arrays/package.json +5 -5
- package/core/auth/node_modules/.bin/mkdist +2 -2
- package/core/auth/node_modules/.bin/tsc +2 -2
- package/core/auth/node_modules/.bin/tsserver +2 -2
- package/core/auth/package.json +5 -5
- package/core/build/node_modules/.bin/mkdist +2 -2
- package/core/build/node_modules/.bin/tsc +2 -2
- package/core/build/node_modules/.bin/tsserver +2 -2
- package/core/build/node_modules/.bin/vite +2 -2
- package/core/build/node_modules/.bin/vite-ssg +2 -2
- package/core/build/node_modules/.bin/vue-docgen-web-types +2 -2
- package/core/build/package.json +9 -9
- package/core/build/src/stacks.ts +45 -22
- package/core/build/src/vue-components.ts +4 -10
- package/core/cache/node_modules/.bin/mkdist +2 -2
- package/core/cache/node_modules/.bin/tsc +2 -2
- package/core/cache/node_modules/.bin/tsserver +2 -2
- package/core/cache/package.json +8 -8
- package/core/chat/node_modules/.bin/mkdist +2 -2
- package/core/chat/node_modules/.bin/tsc +2 -2
- package/core/chat/node_modules/.bin/tsserver +2 -2
- package/core/chat/package.json +9 -9
- package/core/cli/package.json +4 -4
- package/core/cli/src/actions/index.ts +0 -1
- package/core/cli/src/index.ts +1 -0
- package/core/cli/src/{actions/run.ts → run.ts} +3 -3
- package/core/cloud/node_modules/.bin/mkdist +2 -2
- package/core/cloud/node_modules/.bin/tsc +2 -2
- package/core/cloud/node_modules/.bin/tsserver +2 -2
- package/core/cloud/package.json +5 -5
- package/core/collections/node_modules/.bin/mkdist +2 -2
- package/core/collections/node_modules/.bin/tsc +2 -2
- package/core/collections/node_modules/.bin/tsserver +2 -2
- package/core/collections/package.json +5 -5
- package/core/config/node_modules/.bin/mkdist +2 -2
- package/core/config/node_modules/.bin/tsc +2 -2
- package/core/config/node_modules/.bin/tsserver +2 -2
- package/core/config/package.json +5 -5
- package/core/config/src/helpers.ts +1 -1
- package/core/config/src/index.ts +17 -14
- package/core/dashboard/package.json +4 -4
- package/core/database/node_modules/.bin/mkdist +2 -2
- package/core/database/node_modules/.bin/tsc +2 -2
- package/core/database/node_modules/.bin/tsserver +2 -2
- package/core/database/package.json +5 -5
- package/core/datetime/node_modules/.bin/mkdist +2 -2
- package/core/datetime/node_modules/.bin/tsc +2 -2
- package/core/datetime/node_modules/.bin/tsserver +2 -2
- package/core/datetime/package.json +5 -5
- package/core/desktop/node_modules/.bin/mkdist +2 -2
- package/core/desktop/node_modules/.bin/tsc +2 -2
- package/core/desktop/node_modules/.bin/tsserver +2 -2
- package/core/desktop/package.json +7 -7
- package/core/docs/node_modules/.bin/mkdist +2 -2
- package/core/docs/node_modules/.bin/tsc +2 -2
- package/core/docs/node_modules/.bin/tsserver +2 -2
- package/core/docs/node_modules/.bin/vitepress +2 -2
- package/core/docs/package.json +6 -6
- package/core/domains/node_modules/.bin/mkdist +2 -2
- package/core/domains/node_modules/.bin/tsc +2 -2
- package/core/domains/node_modules/.bin/tsserver +2 -2
- package/core/domains/package.json +5 -5
- package/core/drivers/node_modules/.bin/mkdist +2 -2
- package/core/drivers/node_modules/.bin/tsc +2 -2
- package/core/drivers/node_modules/.bin/tsserver +2 -2
- package/core/drivers/package.json +5 -5
- package/core/email/node_modules/.bin/mkdist +2 -2
- package/core/email/node_modules/.bin/tsc +2 -2
- package/core/email/node_modules/.bin/tsserver +2 -2
- package/core/email/package.json +16 -16
- package/core/email/src/drivers/sendgrid.ts +6 -6
- package/core/error-handling/node_modules/.bin/mkdist +2 -2
- package/core/error-handling/node_modules/.bin/tsc +2 -2
- package/core/error-handling/node_modules/.bin/tsserver +2 -2
- package/core/error-handling/package.json +5 -5
- package/core/events/node_modules/.bin/mkdist +2 -2
- package/core/events/node_modules/.bin/tsc +2 -2
- package/core/events/node_modules/.bin/tsserver +2 -2
- package/core/events/package.json +5 -5
- package/core/git/node_modules/.bin/changelogen +2 -2
- package/core/git/node_modules/.bin/mkdist +2 -2
- package/core/git/node_modules/.bin/tsc +2 -2
- package/core/git/node_modules/.bin/tsserver +2 -2
- package/core/git/package.json +7 -7
- package/core/health/node_modules/.bin/mkdist +2 -2
- package/core/health/node_modules/.bin/tsc +2 -2
- package/core/health/node_modules/.bin/tsserver +2 -2
- package/core/health/package.json +5 -5
- package/core/lint/node_modules/.bin/eslint +2 -2
- package/core/lint/node_modules/.bin/mkdist +2 -2
- package/core/lint/node_modules/.bin/tsc +2 -2
- package/core/lint/node_modules/.bin/tsserver +2 -2
- package/core/lint/package.json +7 -7
- package/core/logging/node_modules/.bin/mkdist +2 -2
- package/core/logging/node_modules/.bin/tsc +2 -2
- package/core/logging/node_modules/.bin/tsserver +2 -2
- package/core/logging/package.json +5 -5
- package/core/modules/node_modules/.bin/mkdist +2 -2
- package/core/modules/node_modules/.bin/tsc +2 -2
- package/core/modules/node_modules/.bin/tsserver +2 -2
- package/core/modules/package.json +5 -5
- package/core/notifications/node_modules/.bin/mkdist +2 -2
- package/core/notifications/node_modules/.bin/tsc +2 -2
- package/core/notifications/node_modules/.bin/tsserver +2 -2
- package/core/notifications/package.json +26 -26
- package/core/objects/node_modules/.bin/mkdist +2 -2
- package/core/objects/node_modules/.bin/tsc +2 -2
- package/core/objects/node_modules/.bin/tsserver +2 -2
- package/core/objects/package.json +5 -5
- package/core/pages/node_modules/.bin/mkdist +17 -0
- package/core/pages/node_modules/.bin/tsc +17 -0
- package/core/pages/node_modules/.bin/tsserver +17 -0
- package/core/pages/package.json +55 -0
- package/core/pages/src/index.ts +19 -0
- package/core/pages/tests/example.test.ts +7 -0
- package/core/path/node_modules/.bin/mkdist +2 -2
- package/core/path/node_modules/.bin/tsc +2 -2
- package/core/path/node_modules/.bin/tsserver +2 -2
- package/core/path/package.json +6 -6
- package/core/path/src/index.ts +48 -3
- package/core/payments/node_modules/.bin/mkdist +2 -2
- package/core/payments/node_modules/.bin/tsc +2 -2
- package/core/payments/node_modules/.bin/tsserver +2 -2
- package/core/payments/package.json +5 -5
- package/core/push/node_modules/.bin/mkdist +2 -2
- package/core/push/node_modules/.bin/tsc +2 -2
- package/core/push/node_modules/.bin/tsserver +2 -2
- package/core/push/package.json +7 -7
- package/core/queue/node_modules/.bin/mkdist +2 -2
- package/core/queue/node_modules/.bin/tsc +2 -2
- package/core/queue/node_modules/.bin/tsserver +2 -2
- package/core/queue/package.json +5 -5
- package/core/realtime/node_modules/.bin/mkdist +2 -2
- package/core/realtime/node_modules/.bin/tsc +2 -2
- package/core/realtime/node_modules/.bin/tsserver +2 -2
- package/core/realtime/package.json +5 -5
- package/core/router/node_modules/.bin/mkdist +2 -2
- package/core/router/node_modules/.bin/tsc +2 -2
- package/core/router/node_modules/.bin/tsserver +2 -2
- package/core/router/package.json +5 -5
- package/core/search-engine/node_modules/.bin/mkdist +2 -2
- package/core/search-engine/node_modules/.bin/tsc +2 -2
- package/core/search-engine/node_modules/.bin/tsserver +2 -2
- package/core/search-engine/package.json +7 -7
- package/core/security/node_modules/.bin/mkdist +2 -2
- package/core/security/node_modules/.bin/tsc +2 -2
- package/core/security/node_modules/.bin/tsserver +2 -2
- package/core/security/package.json +5 -5
- package/core/security/src/crypt.ts +2 -2
- package/core/server/node_modules/.bin/mkdist +2 -2
- package/core/server/node_modules/.bin/nitro +2 -2
- package/core/server/node_modules/.bin/nitropack +2 -2
- package/core/server/node_modules/.bin/tsc +2 -2
- package/core/server/node_modules/.bin/tsserver +2 -2
- package/core/server/node_modules/.bin/vite +2 -2
- package/core/server/package.json +7 -7
- package/core/sms/node_modules/.bin/mkdist +2 -2
- package/core/sms/node_modules/.bin/tsc +2 -2
- package/core/sms/node_modules/.bin/tsserver +2 -2
- package/core/sms/package.json +15 -15
- package/core/storage/node_modules/.bin/mkdist +2 -2
- package/core/storage/node_modules/.bin/tsc +2 -2
- package/core/storage/node_modules/.bin/tsserver +2 -2
- package/core/storage/package.json +5 -5
- package/core/storage/src/index.ts +15 -0
- package/core/strings/node_modules/.bin/mkdist +2 -2
- package/core/strings/node_modules/.bin/tsc +2 -2
- package/core/strings/node_modules/.bin/tsserver +2 -2
- package/core/strings/package.json +7 -7
- package/core/tables/node_modules/.bin/mkdist +2 -2
- package/core/tables/node_modules/.bin/tsc +2 -2
- package/core/tables/node_modules/.bin/tsserver +2 -2
- package/core/tables/node_modules/.bin/vite +2 -2
- package/core/tables/package.json +5 -5
- package/core/testing/node_modules/.bin/mkdist +2 -2
- package/core/testing/node_modules/.bin/playwright +2 -2
- package/core/testing/node_modules/.bin/tsc +2 -2
- package/core/testing/node_modules/.bin/tsserver +2 -2
- package/core/testing/node_modules/.bin/vitest +2 -2
- package/core/testing/package.json +9 -9
- package/core/types/node_modules/.bin/mkdist +2 -2
- package/core/types/node_modules/.bin/tsc +2 -2
- package/core/types/node_modules/.bin/tsserver +2 -2
- package/core/types/node_modules/.bin/vite-ssg +2 -2
- package/core/types/node_modules/.bin/vitepress +2 -2
- package/core/types/package.json +10 -10
- package/core/types/src/cli.ts +13 -0
- package/core/types/src/library.ts +1 -1
- package/core/types/src/pages.ts +10 -8
- package/core/ui/node_modules/.bin/mkdist +2 -2
- package/core/ui/node_modules/.bin/tsc +2 -2
- package/core/ui/node_modules/.bin/tsserver +2 -2
- package/core/ui/node_modules/.bin/vue-tsc +2 -2
- package/core/ui/package.json +9 -9
- package/core/ui/src/index.ts +1 -1
- package/core/ui/src/unocss.ts +1 -1
- package/core/utils/node_modules/.bin/mkdist +2 -2
- package/core/utils/node_modules/.bin/rimraf +2 -2
- package/core/utils/node_modules/.bin/tsc +2 -2
- package/core/utils/node_modules/.bin/tsserver +2 -2
- package/core/utils/package.json +11 -11
- package/core/utils/src/helpers.ts +4 -2
- package/core/validation/README.md +53 -0
- package/core/validation/node_modules/.bin/mkdist +17 -0
- package/core/validation/node_modules/.bin/tsc +17 -0
- package/core/validation/node_modules/.bin/tsserver +17 -0
- package/core/validation/package.json +55 -0
- package/core/validation/src/index.ts +3 -0
- package/core/validation/tests/example.test.ts +7 -0
- package/core/x-ray/node_modules/.bin/mkdist +2 -2
- package/core/x-ray/node_modules/.bin/tsc +2 -2
- package/core/x-ray/node_modules/.bin/tsserver +2 -2
- package/core/x-ray/package.json +5 -5
- package/functions/package.json +1 -1
- package/package.json +5 -5
- package/pages/node_modules/.bin/mkdist +17 -0
- package/pages/node_modules/.bin/tsc +17 -0
- package/pages/node_modules/.bin/tsserver +17 -0
- package/pages/package.json +55 -0
- package/pages/src/index.ts +19 -0
- package/pages/tests/example.test.ts +7 -0
- package/shims.d.ts +0 -12
- package/tsconfig.json +2 -0
- package/core/tables/dist/index.html +0 -15
- package/core/tables/old.vite.config.ts +0 -97
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/bin/tsc" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/bin/tsc" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
|
|
3
|
+
|
|
4
|
+
case `uname` in
|
|
5
|
+
*CYGWIN*) basedir=`cygpath -w "$basedir"`;;
|
|
6
|
+
esac
|
|
7
|
+
|
|
8
|
+
if [ -z "$NODE_PATH" ]; then
|
|
9
|
+
export NODE_PATH="/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
10
|
+
else
|
|
11
|
+
export NODE_PATH="$NODE_PATH:/home/runner/work/stacks/stacks/node_modules/.pnpm/node_modules"
|
|
12
|
+
fi
|
|
13
|
+
if [ -x "$basedir/node" ]; then
|
|
14
|
+
exec "$basedir/node" "$basedir/../../../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/bin/tsserver" "$@"
|
|
15
|
+
else
|
|
16
|
+
exec node "$basedir/../../../../../node_modules/.pnpm/typescript@4.9.5/node_modules/typescript/bin/tsserver" "$@"
|
|
17
|
+
fi
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stacksjs/pages",
|
|
3
|
+
"type": "module",
|
|
4
|
+
"version": "0.51.0",
|
|
5
|
+
"packageManager": "pnpm@7.26.3",
|
|
6
|
+
"description": "The Stacks Pages engine.",
|
|
7
|
+
"author": "Chris Breuer",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"funding": "https://github.com/sponsors/chrisbbreuer",
|
|
10
|
+
"homepage": "https://github.com/stacksjs/stacks/tree/main/.stacks/core/pages#readme",
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/stacksjs/stacks.git",
|
|
14
|
+
"directory": "./.stacks/core/pages"
|
|
15
|
+
},
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/stacksjs/stacks/issues"
|
|
18
|
+
},
|
|
19
|
+
"keywords": [
|
|
20
|
+
"pages",
|
|
21
|
+
"utilities",
|
|
22
|
+
"functions",
|
|
23
|
+
"stacks"
|
|
24
|
+
],
|
|
25
|
+
"main": "dist/index.mjs",
|
|
26
|
+
"module": "dist/index.mjs",
|
|
27
|
+
"types": "dist/index.d.ts",
|
|
28
|
+
"contributors": [
|
|
29
|
+
"Chris Breuer <chris@ow3.org>"
|
|
30
|
+
],
|
|
31
|
+
"files": [
|
|
32
|
+
"dist",
|
|
33
|
+
"README.md"
|
|
34
|
+
],
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">=v18.14.0",
|
|
37
|
+
"pnpm": ">=7.26.3"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "mkdist -d",
|
|
41
|
+
"dev": "mkdist -d",
|
|
42
|
+
"prepublishOnly": "pnpm run build",
|
|
43
|
+
"typecheck": "tsc --noEmit"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@stacksjs/collections": "workspace:*"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@stacksjs/testing": "workspace:*",
|
|
50
|
+
"@stacksjs/utils": "workspace:*",
|
|
51
|
+
"fs-extra": "^11.1.0",
|
|
52
|
+
"mkdist": "^1.1.0",
|
|
53
|
+
"typescript": "^4.9.5"
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { page as config } from '@stacksjs/config'
|
|
2
|
+
import fs from 'fs-extra'
|
|
3
|
+
|
|
4
|
+
function generateSettings() {
|
|
5
|
+
config.onboarding.pages.each((page: string) => {
|
|
6
|
+
fs.appendFile(`${config.path}/${page}.vue`)
|
|
7
|
+
})
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
function generateOnboarding() {
|
|
11
|
+
config.onboarding.pages.each((page: string) => {
|
|
12
|
+
fs.appendFile(`${config.path}/${page}.vue`)
|
|
13
|
+
})
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
generateSettings,
|
|
18
|
+
generateOnboarding,
|
|
19
|
+
}
|
package/shims.d.ts
CHANGED
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
interface ImportMetaEnv {
|
|
2
|
-
readonly APP_NAME: string
|
|
3
|
-
readonly APP_ENV: string
|
|
4
|
-
readonly APP_KEY: string
|
|
5
|
-
readonly APP_URL: string
|
|
6
|
-
readonly APP_DEBUG: boolean
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface ImportMeta {
|
|
10
|
-
readonly env: ImportMetaEnv
|
|
11
|
-
}
|
|
12
|
-
|
|
13
1
|
declare interface Window {
|
|
14
2
|
// extend the window
|
|
15
3
|
}
|
package/tsconfig.json
CHANGED
|
@@ -72,6 +72,8 @@
|
|
|
72
72
|
"@stacksjs/notifications/*": ["./core/notifications/src/*"],
|
|
73
73
|
"@stacksjs/objects": ["./core/objects/src/index.ts"],
|
|
74
74
|
"@stacksjs/objects/*": ["./core/objects/src/*"],
|
|
75
|
+
"@stacksjs/pages": ["./core/pages/src/index.ts"],
|
|
76
|
+
"@stacksjs/pages/*": ["./core/pages/src/*"],
|
|
75
77
|
"@stacksjs/path": ["./core/path/src/index.ts"],
|
|
76
78
|
"@stacksjs/path/*": ["./core/path/src/*"],
|
|
77
79
|
"@stacksjs/push": ["./core/push/src/index.ts"],
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Vite + Vue</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-ee90d6db.js"></script>
|
|
9
|
-
<link rel="stylesheet" href="/assets/index-b1ae86b3.css">
|
|
10
|
-
</head>
|
|
11
|
-
<body>
|
|
12
|
-
<div id="app"></div>
|
|
13
|
-
|
|
14
|
-
</body>
|
|
15
|
-
</html>
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { resolve } from 'path'
|
|
2
|
-
import { defineConfig } from 'vite'
|
|
3
|
-
import Vue from '@vitejs/plugin-vue'
|
|
4
|
-
import Unocss from 'unocss/vite'
|
|
5
|
-
import PresetIcons from '@unocss/preset-icons'
|
|
6
|
-
import AutoImport from 'unplugin-auto-import/vite'
|
|
7
|
-
import Components from 'unplugin-vue-components/vite'
|
|
8
|
-
|
|
9
|
-
/** @type {import('vite').UserConfig} */
|
|
10
|
-
const config = {
|
|
11
|
-
resolve: {
|
|
12
|
-
// dedupe: ['vue'],
|
|
13
|
-
alias: {
|
|
14
|
-
'~': resolve(__dirname, 'src'),
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
optimizeDeps: {
|
|
19
|
-
exclude: ['vue-demi'],
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
plugins: [
|
|
23
|
-
Vue(),
|
|
24
|
-
|
|
25
|
-
Unocss({
|
|
26
|
-
mode: 'vue-scoped',
|
|
27
|
-
presets: [
|
|
28
|
-
PresetIcons({
|
|
29
|
-
prefix: 'i-',
|
|
30
|
-
extraProperties: {
|
|
31
|
-
'display': 'inline-block',
|
|
32
|
-
'vertical-align': 'middle',
|
|
33
|
-
},
|
|
34
|
-
}),
|
|
35
|
-
],
|
|
36
|
-
}),
|
|
37
|
-
|
|
38
|
-
// https://github.com/antfu/unplugin-auto-import
|
|
39
|
-
AutoImport({
|
|
40
|
-
imports: ['vue', '@vueuse/core', {
|
|
41
|
-
'~/composables/dark': ['isDark', 'toggleDark'],
|
|
42
|
-
'~/composables/table': ['useTable'],
|
|
43
|
-
}],
|
|
44
|
-
dts: 'src/auto-imports.d.ts',
|
|
45
|
-
eslintrc: {
|
|
46
|
-
enabled: true,
|
|
47
|
-
},
|
|
48
|
-
}),
|
|
49
|
-
|
|
50
|
-
// https://github.com/antfu/unplugin-vue-components
|
|
51
|
-
Components({
|
|
52
|
-
dirs: ['src/components'],
|
|
53
|
-
// allow auto import and register components used in markdown
|
|
54
|
-
include: [/\.vue$/, /\.vue\?vue/, /\.md$/],
|
|
55
|
-
dts: 'src/components.d.ts',
|
|
56
|
-
}),
|
|
57
|
-
],
|
|
58
|
-
|
|
59
|
-
build: {
|
|
60
|
-
lib: {
|
|
61
|
-
entry: resolve(__dirname, 'src/main.ts'),
|
|
62
|
-
name: 'table-vue',
|
|
63
|
-
fileName: format => `table-vue.${format}.js`,
|
|
64
|
-
},
|
|
65
|
-
|
|
66
|
-
rollupOptions: {
|
|
67
|
-
external: ['vue', 'vue-demi'],
|
|
68
|
-
output: {
|
|
69
|
-
// exports: 'named',
|
|
70
|
-
globals: {
|
|
71
|
-
'vue': 'Vue',
|
|
72
|
-
'vue-demi': 'vue-demi',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
sourcemap: true,
|
|
78
|
-
minify: true,
|
|
79
|
-
},
|
|
80
|
-
|
|
81
|
-
test: {
|
|
82
|
-
include: ['tests/**/*.test.ts'],
|
|
83
|
-
// environment: 'jsdom',
|
|
84
|
-
deps: {
|
|
85
|
-
inline: ['@vue', '@vueuse', 'vue-demi'],
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
// https://vitejs.dev/config
|
|
91
|
-
export default defineConfig(({ command }) => {
|
|
92
|
-
if (command === 'serve')
|
|
93
|
-
return config
|
|
94
|
-
|
|
95
|
-
// command === 'build'
|
|
96
|
-
return config
|
|
97
|
-
})
|