-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove reactivity transform alt prefixes * Remove non-essential reactivity transform snippets * Modify Vue script snippets * Remove indentation from style blocks * Fix vueuse snippet * Generate docs * Add vue router script snippets * Reorder sections * Fix defineRouter indentation * Add vue macros * Add missing comma * Show more placeholder options in docs * Provide better :to prop handling on nuxt link * Bump to v0.6.0
- Loading branch information
Showing
20 changed files
with
429 additions
and
215 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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,9 @@ | ||
import { XSnippetVariant } from "../../models/app.ts"; | ||
import { script } from "./script.ts"; | ||
|
||
export const vueMacros: XSnippetVariant[] = [ | ||
{ | ||
fileName: "vue-macros", | ||
snippetDefinitions: [script], | ||
}, | ||
]; |
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,66 @@ | ||
import { XSnippetDefinition } from "../../models/app.ts"; | ||
|
||
export const script: XSnippetDefinition = { | ||
meta: { | ||
title: "Vue Macros", | ||
lang: "javascript", | ||
}, | ||
snippets: { | ||
vdefineModel: { | ||
name: "Define model", | ||
body: [ | ||
"const { modelValue$2 } = defineModel<{", | ||
"\tmodelValue: ${1:string}", | ||
"}>()" | ||
], | ||
alt: ["vmacro:model"] | ||
}, | ||
vdefinePropsRefs: { | ||
name: "Define props refs", | ||
body: [ | ||
"const { $2 } = definePropsRefs<{", | ||
"\t$1", | ||
"}>()" | ||
], | ||
alt: ["vmacro:props"] | ||
}, | ||
vdefineOptions: { | ||
name: "Define options", | ||
body: [ | ||
"defineOptions({", | ||
"\t$0", | ||
"})" | ||
], | ||
alt: ["vmacro:options"] | ||
}, | ||
vdefineSlots: { | ||
name: "Define slots", | ||
body: [ | ||
"defineSlots<{", | ||
"\t$0", | ||
"}>()" | ||
], | ||
alt: ["vmacro:slots"] | ||
}, | ||
vdefineRender: { | ||
name: "Define render", | ||
body: [ | ||
"defineRender(", | ||
"\t$0", | ||
")" | ||
], | ||
alt: ["vmacro:render"] | ||
}, | ||
"vdefineRender:fn": { | ||
name: "Define render function", | ||
"body": [ | ||
"defineRender(() => {", | ||
"\treturn (", | ||
"\t\t$0", | ||
"\t)", | ||
"})" | ||
], | ||
alt: ["vmacro:render:fn"] | ||
}, | ||
} | ||
} |
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,30 @@ | ||
import { XSnippetDefinition } from "../../models/app.ts"; | ||
|
||
export const script: XSnippetDefinition = { | ||
meta: { | ||
title: "Vue Router (script)", | ||
lang: "javascript", | ||
}, | ||
snippets: { | ||
vrouter: { | ||
name: "Vue router", | ||
body: "const ${1:router} = useRouter()", | ||
}, | ||
vroute: { | ||
name: "Vue route", | ||
body: "const ${1:route} = useRoute()", | ||
}, | ||
"vrouter:create": { | ||
name: "Create Vue router", | ||
body: [ | ||
"const router = createRouter({", | ||
"\thistory: createWebHashHistory(),", | ||
"\troutes: ${1:routes},", | ||
"\tscrollBehavior(to, from, savedPosition) {", | ||
"\t\t$2", | ||
"\t}", | ||
"})" | ||
], | ||
}, | ||
} | ||
} |
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
Oops, something went wrong.