A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/vue-macros/vue-macros/commit/edbe3d89bb30bf09cf3709e4a96d2e44fcfb0cc7 below:

rename main package name · vue-macros/vue-macros@edbe3d8 · GitHub

Expand file treeCollapse file tree 84 files changed

+153

-153

lines changed Original file line number Diff line number Diff line change

@@ -7,8 +7,8 @@

7 7

<p align="center">Explore more macros and syntax sugar to Vue.</p>

8 8 9 9

<p align="center">

10 -

<a href="https://npmjs.com/package/unplugin-vue-macros">

11 -

<img src="https://img.shields.io/npm/v/unplugin-vue-macros.svg" alt="NPM version">

10 +

<a href="https://npmjs.com/package/vue-macros">

11 +

<img src="https://img.shields.io/npm/v/vue-macros.svg" alt="NPM version">

12 12

</a>

13 13

</p>

14 14

@@ -27,7 +27,7 @@

27 27

## Installation

28 28 29 29

```bash

30 -

npm i -D unplugin-vue-macros

30 +

npm i -D vue-macros

31 31

```

32 32 33 33

## Usage

Original file line number Diff line number Diff line change

@@ -1,9 +1,9 @@

1 1

import process from 'node:process'

2 2

import { transformerTwoslash } from '@shikijs/vitepress-twoslash'

3 3

import ts from 'typescript'

4 -

import VueMacrosPlugin from 'unplugin-vue-macros/volar'

5 4

import { defineConfig } from 'vitepress'

6 5

import { groupIconMdPlugin } from 'vitepress-plugin-group-icons'

6 +

import VueMacrosPlugin from 'vue-macros/volar'

7 7

import { docsLink } from '../../../macros'

8 8

import { getLocaleConfig } from './theme'

9 9

@@ -60,7 +60,7 @@ export default defineConfig({

60 60

compilerOptions: {

61 61

jsx: ts.JsxEmit.Preserve,

62 62

jsxFactory: 'vue',

63 -

types: ['unplugin-vue-macros/macros-global', 'vue/jsx'],

63 +

types: ['vue-macros/macros-global', 'vue/jsx'],

64 64

},

65 65

vueCompilerOptions: {

66 66

plugins: [VueMacrosPlugin],

Original file line number Diff line number Diff line change

@@ -64,7 +64,7 @@ defineProps<{

64 64

```jsonc {3,5} [tsconfig.json]

65 65

{

66 66

"vueCompilerOptions": {

67 -

"plugins": ["unplugin-vue-macros/volar"],

67 +

"plugins": ["vue-macros/volar"],

68 68

"vueMacros": {

69 69

"booleanProp": true,

70 70

},

Original file line number Diff line number Diff line change

@@ -220,7 +220,7 @@ export default a

220 220

```jsonc {3,5} [tsconfig.json]

221 221

{

222 222

"vueCompilerOptions": {

223 -

"plugins": ["unplugin-vue-macros/volar"],

223 +

"plugins": ["vue-macros/volar"],

224 224

"vueMacros": {

225 225

"exportExpose": true,

226 226

},

Original file line number Diff line number Diff line change

@@ -33,7 +33,7 @@ export const bar: number = 1 // with default value

33 33

```jsonc {3,5} [tsconfig.json]

34 34

{

35 35

"vueCompilerOptions": {

36 -

"plugins": ["unplugin-vue-macros/volar"],

36 +

"plugins": ["vue-macros/volar"],

37 37

"vueMacros": {

38 38

"exportProps": true,

39 39

},

Original file line number Diff line number Diff line change

@@ -34,7 +34,7 @@ export default () => <div>ok</div>

34 34

```jsonc {3,7} [tsconfig.json]

35 35

{

36 36

"vueCompilerOptions": {

37 -

"plugins": ["unplugin-vue-macros/volar"],

37 +

"plugins": ["vue-macros/volar"],

38 38

"vueMacros": {

39 39

"exportRender": true,

40 40

},

Original file line number Diff line number Diff line change

@@ -231,7 +231,7 @@ Modifiers are special postfixes denoted by a `_`, which indicate that a directiv

231 231

```jsonc {3} [tsconfig.json]

232 232

{

233 233

"vueCompilerOptions": {

234 -

"plugins": ["unplugin-vue-macros/volar"],

234 +

"plugins": ["vue-macros/volar"],

235 235

},

236 236

}

237 237

```

Original file line number Diff line number Diff line change

@@ -127,10 +127,10 @@ Every reactivity API that returns refs will have a `$`-prefixed macro equivalent

127 127

- [`customRef`](https://vuejs.org/api/reactivity-advanced#customref) -> `$customRef`

128 128

- [`toRef`](https://vuejs.org/api/reactivity-utilities#toref) -> `$toRef`

129 129 130 -

These macros are globally available and do not need to be imported when Reactivity Transform is enabled, but you can optionally import them from `unplugin-vue-macros/macros` or `@vue-macros/reactivity-transform/macros-global` if you want to be more explicit:

130 +

These macros are globally available and do not need to be imported when Reactivity Transform is enabled, but you can optionally import them from `vue-macros/macros` or `@vue-macros/reactivity-transform/macros-global` if you want to be more explicit:

131 131 132 132

```js twoslash

133 -

import { $ref } from 'unplugin-vue-macros/macros'

133 +

import { $ref } from 'vue-macros/macros'

134 134

// for standalone version:

135 135

// import { $ref } from '@vue-macros/reactivity-transform/macros-global'

136 136

@@ -386,10 +386,10 @@ This also means the macros can work in any files where valid JS / TS are allowed

386 386

Since the macros are available globally, their types need to be explicitly referenced (e.g. in a `env.d.ts` file):

387 387 388 388

```ts [env.d.ts]

389 -

/// <reference types="unplugin-vue-macros/macros-global" />

389 +

/// <reference types="vue-macros/macros-global" />

390 390 391 391

// or for standalone version:

392 392

/// <reference types="@vue-macros/reactivity-transform/macros-global" />

393 393

```

394 394 395 -

When explicitly importing the macros from `unplugin-vue-macros/macros` or `@vue-macros/reactivity-transform/macros-global`, the type will work without declaring the globals.

395 +

When explicitly importing the macros from `vue-macros/macros` or `@vue-macros/reactivity-transform/macros-global`, the type will work without declaring the globals.

Original file line number Diff line number Diff line change

@@ -41,7 +41,7 @@ defineProps<{

41 41

```jsonc {3,5-7} [tsconfig.json]

42 42

{

43 43

"vueCompilerOptions": {

44 -

"plugins": ["unplugin-vue-macros/volar"],

44 +

"plugins": ["vue-macros/volar"],

45 45

"vueMacros": {

46 46

"scriptLang": {

47 47

"defaultLang": "ts",

Original file line number Diff line number Diff line change

@@ -48,7 +48,7 @@ const value = 'foo'

48 48

```jsonc {3} [tsconfig.json]

49 49

{

50 50

"vueCompilerOptions": {

51 -

"plugins": ["unplugin-vue-macros/volar"],

51 +

"plugins": ["vue-macros/volar"],

52 52

},

53 53

}

54 54

```

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4