-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip: init api * rename * update * wip: emits * feat: supports extends * feat: resolve TS * test: add mixed * fix: circular-referencing * add docs * refactor * refactor: improve * feat: intersection * feat(better-define): init * feat: support intersection * fix: lockfile * fix: TSDeclaration * fix: inline template * feat: withDefaults * feat: emits * fix: ordering * chore: update comments * add changesets * add docs
- Loading branch information
Showing
55 changed files
with
4,176 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
'@vue-macros/common': minor | ||
'unplugin-vue-macros': minor | ||
'@vue-macros/api': patch | ||
'@vue-macros/better-define': patch | ||
'@vue-macros/hoist-static': patch | ||
'@vue-macros/short-emits': patch | ||
--- | ||
|
||
add better define |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# betterDefine | ||
|
||
With enabling `betterDefine`, imported types is supported in `<script setup>` type-based-macros. | ||
|
||
[Related issue](https://github.com/vuejs/core/issues/4294) | ||
|
||
| Features | Supported | | ||
| :----------------: | :----------------: | | ||
| Vue 3 | :white_check_mark: | | ||
| Vue 2 | :white_check_mark: | | ||
| TypeScript / Volar | :white_check_mark: | | ||
|
||
## Basic Usage | ||
|
||
:::: code-group | ||
|
||
::: code-group-item App.vue | ||
|
||
```vue | ||
<script setup lang="ts"> | ||
import type { BaseProps } from './types' | ||
interface Props extends BaseProps { | ||
foo: string | ||
} | ||
defineProps<Props>() | ||
</script> | ||
``` | ||
|
||
::: | ||
|
||
::: code-group-item types.ts | ||
|
||
```ts | ||
export interface BaseProps { | ||
title: string | ||
} | ||
``` | ||
|
||
::: | ||
|
||
:::: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"name": "@vue-macros/api", | ||
"version": "0.0.0", | ||
"packageManager": "pnpm@7.13.5", | ||
"license": "MIT", | ||
"homepage": "https://github.com/sxzz/unplugin-vue-macros#readme", | ||
"bugs": { | ||
"url": "https://github.com/sxzz/unplugin-vue-macros/issues" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/sxzz/unplugin-vue-macros.git" | ||
}, | ||
"author": "三咲智子 <sxzz@sxzz.moe>", | ||
"files": [ | ||
"dist" | ||
], | ||
"main": "./dist/index.js", | ||
"module": "./dist/index.mjs", | ||
"types": "./dist/index.d.ts", | ||
"exports": { | ||
".": { | ||
"require": "./dist/index.js", | ||
"import": "./dist/index.mjs" | ||
}, | ||
"./*": "./*" | ||
}, | ||
"scripts": { | ||
"build": "tsup && tsx ../../scripts/postbuild.mts", | ||
"dev": "DEV=1 tsup" | ||
}, | ||
"dependencies": { | ||
"@babel/types": "^7.19.4", | ||
"@vue-macros/common": "workspace:~" | ||
}, | ||
"devDependencies": {}, | ||
"engines": { | ||
"node": ">=14.19.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export { MagicString } from '@vue-macros/common' | ||
|
||
export * from './vue' | ||
export * from './ts' | ||
export * from './utils' |
Oops, something went wrong.