Skip to content

Commit

Permalink
✨ global type of uno.config.mjs #115
Browse files Browse the repository at this point in the history
  • Loading branch information
trydofor committed Dec 17, 2024
1 parent e20842a commit 7b6934f
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 14 deletions.
6 changes: 6 additions & 0 deletions .changeset/six-singers-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@fessional/razor-common": patch
"@fessional/razor-mobile": patch
---

✨ global type of uno.config.mjs #115
2 changes: 1 addition & 1 deletion layers/common/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from './types/common.global';
export * from './types/vue.global';
export * from './types/module.global';

export {};
2 changes: 1 addition & 1 deletion layers/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fessional/razor-common",
"version": "0.3.2",
"version": "0.3.3",
"description": "common layer for mobile and desktop",
"type": "module",
"main": "./nuxt.config.ts",
Expand Down
10 changes: 10 additions & 0 deletions layers/common/types/module.global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
declare module '@vue/runtime-core' {
import type { AutosizeDirective } from '../plugins/autosize-directive';

interface GlobalDirectives {
vAutosize: AutosizeDirective;
}
}

//
export {};
10 changes: 0 additions & 10 deletions layers/common/types/vue.global.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion layers/mobile/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fessional/razor-mobile",
"version": "0.3.2",
"version": "0.3.3",
"description": "mobile layer with ionic and capacitor",
"type": "module",
"main": "./nuxt.config.ts",
Expand Down
3 changes: 3 additions & 0 deletions layers/mobile/uno.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { fileURLToPath } from 'url';
import { mergeConfigs } from '@unocss/core';

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore // ERROR(vue-tsc) Could not find a declaration file for module './.nuxt/uno.config.mjs' #115
import config from './.nuxt/uno.config.mjs';

export default mergeConfigs([fileURLToPath(import.meta.url).startsWith(process.cwd()) ? config : {}, {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fessional/razor",
"version": "0.3.2",
"version": "0.3.3",
"description": "Use front-end tech (Nuxt/Ts) to build multi-platform from one codebase, suitable for small team and app to write app once, apply almost anywhere.",
"type": "module",
"files": [
Expand Down

0 comments on commit 7b6934f

Please sign in to comment.