Skip to content

Commit

Permalink
fix: Nuxt components snippets activation
Browse files Browse the repository at this point in the history
  • Loading branch information
adhamfarrag committed Sep 21, 2024
1 parent 7ee551a commit 451ef4e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 25 deletions.
14 changes: 11 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@
],
"snippets": [
{
"language": "vue",
"language": "html",
"path": "./snippets/nuxt/components.json"
},
{
Expand All @@ -1068,11 +1068,19 @@
},
{
"language": "javascript",
"path": "./snippets/nitro/imports.json"
"path": "./snippets/nitro/utils.json"
},
{
"language": "typescript",
"path": "./snippets/nitro/utils.json"
},
{
"language": "javascript",
"path": "./snippets/nitro/boilerplates.json"
},
{
"language": "typescript",
"path": "./snippets/nitro/imports.json"
"path": "./snippets/nitro/boilerplates.json"
}
]
},
Expand Down
10 changes: 5 additions & 5 deletions snippets/Nuxt/components.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,6 @@
],
"description": "Nuxt | NuxtErrorBoundary"
},
"Nuxt | Template with ID": {
"prefix": "templateWithId",
"body": ["<template #$1>", " $2", "</template>"],
"description": "Nuxt | Template with ID"
},
"Nuxt | NuxtLoadingIndicator": {
"prefix": "nuxtLoadingIndicator",
"body": ["<NuxtLoadingIndicator $1/>"],
Expand Down Expand Up @@ -77,5 +72,10 @@
"prefix": "pageKey",
"body": ["page-key=\"$1\""],
"description": "Nuxt | pageKey"
},
"Nuxt | Template with ID": {
"prefix": "templateWithId",
"body": ["<template #$1>", " $2", "</template>"],
"description": "Nuxt | Template with ID"
}
}
19 changes: 2 additions & 17 deletions snippets/Nitro/imports.json → snippets/nitro/boilerplates.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"defineNitroPlugin": {
"defineNitroPlugin": {
"prefix": "defineNitroPlugin",
"description": "Define Nitro Plugins",
"body": [
Expand All @@ -9,21 +9,6 @@
],
"isFileTemplate": true
},
"getRouteRules": {
"prefix": "getRouteRules",
"description": "Get Route Rules",
"body": ["const ${1:routeRules} = getRouteRules($2);"]
},
"useNitroApp": {
"prefix": "useNitroApp",
"description": "Use Nitro App",
"body": ["const ${1:nitroApp} = useNitroApp();"]
},
"useStorage": {
"prefix": "useStorage",
"description": "Use Storage",
"body": ["const ${1:storage} = useStorage();"]
},
"defineRenderHandler": {
"prefix": "defineRenderHandler",
"body": [
Expand All @@ -35,4 +20,4 @@
],
"description": "defineRenderHandler"
}
}
}
17 changes: 17 additions & 0 deletions snippets/nitro/utils.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"getRouteRules": {
"prefix": "getRouteRules",
"description": "Get Route Rules",
"body": ["const ${1:routeRules} = getRouteRules($2);"]
},
"useNitroApp": {
"prefix": "useNitroApp",
"description": "Use Nitro App",
"body": ["const ${1:nitro} = useNitroApp();"]
},
"useStorage": {
"prefix": "useStorage",
"description": "Use Storage",
"body": ["const ${1:storage} = useStorage();"]
}
}

0 comments on commit 451ef4e

Please sign in to comment.