Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 30abdcd

Browse files
init extension
0 parents commit 30abdcd

File tree

11 files changed

+600
-0
lines changed

11 files changed

+600
-0
lines changed

‎.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Set default behavior to automatically normalize line endings.
2+
* text=auto

‎.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules
2+
*.vsix

‎.vscode/launch.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
// A launch configuration that launches the extension inside a new window
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
{
6+
"version": "0.2.0",
7+
"configurations": [
8+
{
9+
"name": "Extension",
10+
"type": "extensionHost",
11+
"request": "launch",
12+
"args": [
13+
"--extensionDevelopmentPath=${workspaceFolder}"
14+
]
15+
}
16+
]
17+
}

‎.vscodeignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vscode/**
2+
.vscode-test/**
3+
.gitignore
4+
vsc-extension-quickstart.md

‎CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Change Log
2+
3+
All notable changes to the "vue-script-setup-snippets" extension will be documented in this file.
4+
5+
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
6+
7+
## [Unreleased]
8+
9+
- Initial release

‎README.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
# Vue `script setup` snippets
2+
3+
4+
5+
6+
<img alt="logo" src="/img/logo.png" width="200" height="200"/>
7+
8+
In VSCode search for **`vue-script-setup-snippets`** and install it.
9+
10+
## Features
11+
12+
This extension adds snippets for [Vue 3 script setup](https://vuejs.org/api/composition-api-setup.html) syntax.
13+
14+
15+
## Snippets
16+
17+
>Note: `1ドル`, `2ドル`, etc. are placeholders. Press `Tab` to jump between placeholders.
18+
19+
| Snippet | Purpose |
20+
| ------- | ------- |
21+
| `s-file` | Vue 3 script setup file |
22+
| `s-file-ts` | Vue 3 script setup file with typescript |
23+
|`s-ref` | `const 1ドル = ref(2ドル)` |
24+
|`s-ref-ts` | `const 1ドル: Ref<2ドル> = ref(3ドル)` |
25+
|`s-props` | `const 1ドル = defineProps<2ドル>()` |
26+
|`s-props-ts` | `const 1ドル = defineProps<2ドル>()` |
27+
|`s-emit` | `const 1ドル = defineEmit<2ドル>()` |
28+
|`s-emit-ts` | `const 1ドル = defineEmit<2ドル>()` |
29+
|`s-context` | `const 1ドル = defineContext<2ドル>()` |
30+
|`s-context-ts` | `const 1ドル = defineContext<2ドル>()` |
31+
|`s-computed` | `const 1ドル = computed(() => 2ドル)` |
32+
|`s-computed-ts` | `const 1ドル: Ref<2ドル> = computed(() => 3ドル)` |
33+
|`s-watch` | `watch(1,ドル (2ドル) => { 3ドル })` |
34+
|`s-watch-getter` | `watch(()=>1,ドル (2ドル) => { 3ドル })` |
35+
|`s-ronly` | `const 1ドル = readonly(2ドル)` |
36+
|`s-ronly-ts` | `const 1ドル: Readonly<Ref<2ドル>> = readonly(3ドル)` |
37+
|`s-weffect` | `watchEffect(() => { 1ドル })` |
38+
|`s-wpeffect` | `watchPostEffect(() => { 1ドル })` |
39+
|`s-wseffect` | `watchSyncEffect(() => { 1ドル })` |
40+
|`s-prvd` | `const 1ドル = provide(2,ドル 3ドル)` |
41+
|`s-prvd-ts` | `const 1ドル: InjectionKey<2ドル> = provide(3,ドル 4ドル)` |
42+
|`s-inject` | `const 1ドル = inject(2,ドル 3ドル)` |
43+
|`s-inject-ts` | `const 1ドル: Ref<2ドル> = inject(3,ドル 4ドル)` |
44+
|`s-mnt` | `onMounted(() => { 1ドル })` |
45+
|`s-upd` | `onUpdated(() => { 1ドル })` |
46+
|`s-umnt` | `onUnmounted(() => { 1ドル })` |
47+
|`s-bmnt` | `onBeforeMount(() => { 1ドル })` |
48+
|`s-bupd` | `onBeforeUpdate(() => { 1ドル })` |
49+
|`s-bumnt` | `onBeforeUnmount(() => { 1ドル })` |
50+
|`s-err` | `onErrorCaptured(() => { 1ドル })` |
51+
|`s-rtrk` | `onRenderTracked(() => { 1ドル })` |
52+
|`s-rtrg` | `onRenderTriggered(() => { 1ドル })` |
53+
|`s-act` | `onActivated(() => { 1ドル })` |
54+
|`s-dact` | `onDeactivated(() => { 1ドル })` |
55+
|`s-spf` | `onServerPrefetch(() => { 1ドル })` |
56+
|`s-isref` | `isRef(1ドル)` |
57+
|`s-unref` | `unref(1ドル)` |
58+
|`s-toref` | `toRef(1,ドル 2ドル)` |
59+
|`s-torefs` | `toRefs(1ドル)` |
60+
|`s-isprx` | `isProxy(1ドル)` |
61+
|`s-isrct` | `isReactive(1ドル)` |
62+
|`s-isrdo` | `isReadonly(1ドル)` |
63+
|`s-ssref` | `shallowRef(1ドル)` |
64+
|`s-trref` | `triggerRef(1ドル)` |
65+
|`s-csref` | `customRef((1ドル) => { return { get: () => 2,ドル set: (3ドル) => 4ドル } })` |
66+
|`s-ssrct` | `shallowReactive(1ドル)` |
67+
|`s-ssrdo` | `shallowReadonly(1ドル)` |
68+
|`s-toraw` | `toRaw(1ドル)` |
69+
|`s-mkraw` | `markRaw(1ドル)` |
70+
|`s-efscp` | `effectScope((1ドル) => { 2ドル })` |
71+
|`s-curscp` | `getCurrentScope()` |
72+
|`s-ondscp` | `onScopeDispose(() => { 1ドル })` |

‎img/logo.png

44.2 KB
Loading[フレーム]

‎package.json

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
{
2+
"name": "vue-script-setup-snippets",
3+
"displayName": "Vue script setup snippets",
4+
"description": "Snippets for script setup",
5+
"version": "0.0.1",
6+
"icon": "img/logo.png",
7+
"author": "Boussadjra Brahim",
8+
"publisher": "BoussadjraBrahim",
9+
"engines": {
10+
"vscode": "^1.74.0"
11+
},
12+
"keywords": [
13+
"Vue",
14+
"Vue 3",
15+
"Vue script setup",
16+
"Composition API",
17+
"Vue Snippets"
18+
],
19+
"categories": [
20+
"Snippets"
21+
],
22+
"contributes": {
23+
"snippets": [
24+
{
25+
"language": "vue",
26+
"path": "./snippets/vue.json"
27+
},
28+
{
29+
"language": "javascript",
30+
"path": "./snippets/vue-script.json"
31+
},
32+
{
33+
"language": "typescript",
34+
"path": "./snippets/vue-script.json"
35+
}
36+
]
37+
},
38+
"license": "MIT",
39+
"repository": {
40+
"type": "git",
41+
"url": "https://github.com/boussadjra/vue-script-setup-snippets"
42+
},
43+
"bugs": {
44+
"url": "https://github.com/boussadjra/vue-script-setup-snippets/issues"
45+
}
46+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /