Skip to content

Commit

Permalink
chore: fix hooks, styles, directives deps
Browse files Browse the repository at this point in the history
  • Loading branch information
kirklin committed Jul 3, 2024
1 parent 997b1c6 commit fa41b70
Show file tree
Hide file tree
Showing 12 changed files with 98 additions and 30 deletions.
26 changes: 26 additions & 0 deletions apps/admin/autoResolver/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,38 +11,64 @@ declare module 'vue' {
CAAppNaiveUIProvider: typeof import('@celeris/components')['CAAppNaiveUIProvider']
CACharts: typeof import('@celeris/components')['CACharts']
CAIcon: typeof import('@celeris/components')['CAIcon']
NAlert: typeof import('@celeris/ca-components')['NAlert']
NAvatar: typeof import('@celeris/ca-components')['NAvatar']
NBadge: typeof import('@celeris/ca-components')['NBadge']
NBreadcrumb: typeof import('@celeris/ca-components')['NBreadcrumb']
NBreadcrumbItem: typeof import('@celeris/ca-components')['NBreadcrumbItem']
NButton: typeof import('@celeris/ca-components')['NButton']
NCard: typeof import('@celeris/ca-components')['NCard']
NCheckbox: typeof import('@celeris/ca-components')['NCheckbox']
NCol: typeof import('@celeris/ca-components')['NCol']
NCollapse: typeof import('@celeris/ca-components')['NCollapse']
NCollapseItem: typeof import('@celeris/ca-components')['NCollapseItem']
NColorPicker: typeof import('@celeris/ca-components')['NColorPicker']
NConfigProvider: typeof import('@celeris/ca-components')['NConfigProvider']
NDescriptions: typeof import('@celeris/ca-components')['NDescriptions']
NDescriptionsItem: typeof import('@celeris/ca-components')['NDescriptionsItem']
NDialogProvider: typeof import('@celeris/ca-components')['NDialogProvider']
NDivider: typeof import('@celeris/ca-components')['NDivider']
NDrawer: typeof import('@celeris/ca-components')['NDrawer']
NDrawerContent: typeof import('@celeris/ca-components')['NDrawerContent']
NDropdown: typeof import('@celeris/ca-components')['NDropdown']
NEl: typeof import('@celeris/ca-components')['NEl']
NEmpty: typeof import('@celeris/ca-components')['NEmpty']
NForm: typeof import('@celeris/ca-components')['NForm']
NFormItem: typeof import('@celeris/ca-components')['NFormItem']
NGlobalStyle: typeof import('@celeris/ca-components')['NGlobalStyle']
NGrid: typeof import('@celeris/ca-components')['NGrid']
NGridItem: typeof import('@celeris/ca-components')['NGridItem']
NInput: typeof import('@celeris/ca-components')['NInput']
NInputGroup: typeof import('@celeris/ca-components')['NInputGroup']
NLayout: typeof import('@celeris/ca-components')['NLayout']
NLayoutContent: typeof import('@celeris/ca-components')['NLayoutContent']
NLayoutSider: typeof import('@celeris/ca-components')['NLayoutSider']
NLoadingBarProvider: typeof import('@celeris/ca-components')['NLoadingBarProvider']
NMenu: typeof import('@celeris/ca-components')['NMenu']
NMessageProvider: typeof import('@celeris/ca-components')['NMessageProvider']
NModal: typeof import('@celeris/ca-components')['NModal']
NNotificationProvider: typeof import('@celeris/ca-components')['NNotificationProvider']
NPagination: typeof import('@celeris/ca-components')['NPagination']
NPopover: typeof import('@celeris/ca-components')['NPopover']
NResult: typeof import('@celeris/ca-components')['NResult']
NRow: typeof import('@celeris/ca-components')['NRow']
NScrollbar: typeof import('@celeris/ca-components')['NScrollbar']
NSelect: typeof import('@celeris/ca-components')['NSelect']
NSpace: typeof import('@celeris/ca-components')['NSpace']
NSpin: typeof import('@celeris/ca-components')['NSpin']
NSplit: typeof import('@celeris/ca-components')['NSplit']
NStatistic: typeof import('@celeris/ca-components')['NStatistic']
NStep: typeof import('@celeris/ca-components')['NStep']
NSteps: typeof import('@celeris/ca-components')['NSteps']
NSwitch: typeof import('@celeris/ca-components')['NSwitch']
NTab: typeof import('@celeris/ca-components')['NTab']
NTable: typeof import('@celeris/ca-components')['NTable']
NTabPane: typeof import('@celeris/ca-components')['NTabPane']
NTabs: typeof import('@celeris/ca-components')['NTabs']
NText: typeof import('@celeris/ca-components')['NText']
NTime: typeof import('@celeris/ca-components')['NTime']
NTooltip: typeof import('@celeris/ca-components')['NTooltip']
NVirtualList: typeof import('@celeris/ca-components')['NVirtualList']
RouterLink: typeof import('vue-router')['RouterLink']
RouterView: typeof import('vue-router')['RouterView']
}
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/vite/src/plugins/unocss.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import UnoCSS from "unocss/vite";
import type { PluginOption } from "vite";
import unoShareConfig from "@celeris/styles/unoconfig";
import unoShareConfig from "@celeris/styles/uno.config";

export function createUnoCSSPluginConfig(): PluginOption {
return UnoCSS({
Expand Down
21 changes: 15 additions & 6 deletions packages/web/directives/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,22 @@
"author": "Kirk Lin (https://github.com/kirklin)",
"license": "MIT",
"homepage": "https://github.com/kirklin/celeris-web",
"main": "index.ts",
"module": "index.ts",
"unpkg": "index.js",
"jsdelivr": "index.js",
"types": "index.d.js",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"main": "./index.ts",
"module": "./index.ts",
"types": "./dist/index.d.ts",
"scripts": {
"clean": "pnpm rimraf node_modules && pnpm rimraf dist"
"build": "tsup",
"dev": "tsup --stub",
"clean": "pnpm rimraf node_modules && pnpm rimraf dist",
"prepublishOnly": "npm run build",
"postinstall": "npm run build"
},
"peerDependencies": {
"vue": ">3.0.0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"baseUrl": ".",
"module": "esnext",
"moduleResolution": "Bundler",
"moduleResolution": "Node",
"strict": true,
"sourceMap": false,
"allowSyntheticDefaultImports": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export default defineConfig({
entry: ["./index.ts"],
clean: true,
format: ["esm", "cjs", "iife"],
external: ["vite"],
external: ["vue"],
dts: true,
minify: true,
});
15 changes: 13 additions & 2 deletions packages/web/hooks/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,29 @@
"author": "Kirk Lin (https://github.com/kirklin)",
"license": "MIT",
"homepage": "https://github.com/kirklin/celeris-web",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
}
},
"main": "./index.ts",
"module": "./index.ts",
"types": "./dist/index.d.ts",
"scripts": {
"build": "tsup",
"dev": "tsup --stub",
"clean": "pnpm rimraf node_modules && pnpm rimraf dist",
"test": "vitest",
"test:coverage": "vitest run --coverage"
"test:coverage": "vitest run --coverage",
"prepublishOnly": "npm run build",
"postinstall": "npm run build"
},
"peerDependencies": {
"vue": ">=3.3.4"
},
"dependencies": {
"@celeris/types": "workspace:*",
"@celeris/utils": "workspace:*",
"@vueuse/core": "^10.11.0",
"@vueuse/integrations": "^10.11.0"
Expand Down
5 changes: 4 additions & 1 deletion packages/web/hooks/src/useLoading.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
export function useLoading(initValue = false) {
import type { Ref } from "vue";
import { ref } from "vue";

export function useLoading(initValue = false): { loading: Ref<boolean>; setLoading: (loadingValue: boolean) => void } {
const loading = ref(initValue);
const setLoading = (loadingValue: boolean) => {
loading.value = loadingValue;
Expand Down
23 changes: 23 additions & 0 deletions packages/web/hooks/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"extends": "@celeris/tsconfig/tsconfig.base.json",
"compilerOptions": {
"target": "esnext",
"lib": [
"esnext",
"dom"
],
"baseUrl": ".",
"module": "esnext",
"moduleResolution": "Node",
"strict": true,
"sourceMap": false,
"allowSyntheticDefaultImports": true,
"skipLibCheck": true
},
"include": [
"src/**/*.ts"
],
"exclude": [
"node_modules"
]
}
10 changes: 10 additions & 0 deletions packages/web/hooks/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { defineConfig } from "tsup";

export default defineConfig({
entry: ["./index.ts"],
clean: true,
format: ["esm", "cjs", "iife"],
external: ["vue"],
dts: true,
minify: true,
});
17 changes: 3 additions & 14 deletions packages/web/styles/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,13 @@
"license": "MIT",
"homepage": "https://github.com/kirklin/celeris-web",
"exports": {
".": {
"types": "./dist/index.d.ts",
"import": "./dist/index.js",
"require": "./dist/index.cjs"
},
"./unoconfig": "./uno.config.ts"
"./*": "./*",
".": "./"
},
"main": "./index.ts",
"module": "./index.ts",
"files": [
"src",
"uno.config.ts"
"**/*.css"
],
"scripts": {
"build": "tsup",
"dev": "tsup --stub",
"clean": "pnpm rimraf node_modules && pnpm rimraf dist",
"prepublishOnly": "nr build"
},
"peerDependencies": {
"unocss": "^0.61.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/web/utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"require": "./dist/index.cjs"
}
},
"main": "./dist/index.cjs",
"main": "src/index.ts",
"module": "src/index.ts",
"types": "./dist/index.d.ts",
"files": [
Expand Down
3 changes: 0 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit fa41b70

Please sign in to comment.