Skip to content

Commit 4e06d3b

Browse files
committed
add snippet for the Nuxt defineNuxtModule utility
1 parent 5817929 commit 4e06d3b

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to the "nuxt-vscode-snippets" extension will be documented i
44

55
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
66

7+
## 2.6.0
8+
9+
### Added
10+
11+
- `nmodule` Snippet for the Nuxt `defineNuxtModule` utility
12+
713
## 2.5.1
814

915
### Fixes

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Type part of a snippet, press `enter`, and the snippet unfolds.
7979
| `nclrerr` | `clearError` utility |
8080
| `nroute` | `useRoute` composable |
8181
| `nrouter` | `useRouter` composable |
82+
| `nmodule` | Base code for Nuxt module |
8283

8384
### Vue
8485

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Nuxt VS Code Snippets",
44
"description": "Supercharge your Nuxt development with powerful snippets",
55
"icon": "images/nuxt-logo.png",
6-
"version": "2.5.1",
6+
"version": "2.6.0",
77
"publisher": "zhaolinlau",
88
"license": "MIT",
99
"author": {

snippets/nuxt/nuxt-script.code-snippets

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,5 +269,14 @@
269269
"const router = useRouter()"
270270
],
271271
"description": "Nuxt useRouter composable"
272+
},
273+
"Nuxt define module": {
274+
"prefix": "nmodule",
275+
"body": [
276+
"export default defineNuxtModule((options, nuxt) => {",
277+
"\t${0}",
278+
"})",
279+
],
280+
"description": "Base code for Nuxt module"
272281
}
273282
}

0 commit comments

Comments
 (0)