diff --git a/CHANGELOG.md b/CHANGELOG.md index 993bac7..53ef5f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,23 @@ All notable changes to the "vue-vscode-snippets" extension will be documented in this file. +## 3.2.0 + +- Add base script setup blocks for Vue 3 +- Update README with new snippets + +## 3.1.1 + +- Update README + +## 3.1.0 + +- Remove any extension dependencies + +## 3.0.0 + +- Vetur -> Volar, extension dependencies + ## 2.2.1 - remove name of package for composition api now that we're at vue 3 diff --git a/LICENSE b/LICENSE index a5414ee..dd378c9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 Sarah Drasner +Copyright (c) 2022 Sarah Drasner Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index baaad3f..b71ff08 100644 --- a/README.md +++ b/README.md @@ -28,33 +28,31 @@ ext install Vue VSCode Snippets You can enable tab completion (recommended) by opening `Code > Preferences > Settings` (on a Mac) and applying `"editor.tabCompletion": "onlySnippets"` to your personal settings -### Volar Usage - -This extension works out of the box with Vetur, but if you would rather use Volar, either remove `extensionDependencies` or set it to `volar` instead of `vetur`. You can find this file in the extensions package.json (with [versionnumber] replaced with the current installed version, i.e. 2.2.1): - -- Mac: `~/.vscode/extensions/sdras.vue-vscode-snippets-[versionnumber]/package.json` -- Windows: `C:\Users\\.vscode\extensions\sdras.vue-vscode-snippets-[versionnumber]` - ## Snippets ### Vue -| Snippet | Purpose | -| ------------------ | ------------------------------------------------------------ | -| `vbase` | Single file component base with SCSS | -| `vbase-3` | Single File component Composition API with SCSS | -| `vbase-3-setup` | Single File component setup Composition API with SCSS | -| `vbase-3-reactive` | Single File component Composition API with Reactive and SCSS | -| `vbase-css` | Single file component base with CSS | -| `vbase-pcss` | Single file component base with PostCSS | -| `vbase-styl` | Single file component base with Stylus | -| `vbase-ts` | Single file component base with Typescript | -| `vbase-ts-class` | Single file component base with Typescript Class Format | -| `vbase-3-ts` | Single File component Composition API with Typescript | -| `vbase-3-ts-setup` | Single File component setup Composition API with Typescript | -| `vbase-ns` | Single file component with no styles | -| `vbase-sass` | Single file component base with SASS | -| `vbase-less` | Single file component base with LESS | +These snippets are meant to provide a base scaffold for your single file components (SFC). + +| Snippet | Purpose | +| ------------------ | ------------------------------------------ | +| `vbase-3-ss` | SFC base with script setup | +| `vbase-3-ss-ts` | SFC base with script setup and TypeScript | +| `vbase` | SFC base with SCSS | +| `vbase-3` | SFC Composition API with SCSS | +| `vbase-3-setup` | SFC setup Composition API with SCSS | +| `vbase-3-setup` | SFC setup Composition API with SCSS | +| `vbase-3-reactive` | SFC Composition API with Reactive and SCSS | +| `vbase-css` | SFC base with CSS | +| `vbase-pcss` | SFC base with PostCSS | +| `vbase-styl` | SFC base with Stylus | +| `vbase-ts` | SFC base with Typescript | +| `vbase-ts-class` | SFC base with Typescript Class Format | +| `vbase-3-ts` | SFC Composition API with Typescript | +| `vbase-3-ts-setup` | SFC setup Composition API with Typescript | +| `vbase-ns` | SFC with no styles | +| `vbase-sass` | SFC base with SASS | +| `vbase-less` | SFC base with LESS | ### Template @@ -176,7 +174,6 @@ This extension works out of the box with Vetur, but if you would rather use Vola | `nfont` | link to include fonts in a nuxt project, in nuxt-config | | `ncss` | link to css assets such as normalize | - ### Nuxt Page | Snippet | Purpose | diff --git a/package.json b/package.json index 4f05606..c9f44b3 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,7 @@ "displayName": "Vue VSCode Snippets", "description": "Snippets that will supercharge your Vue workflow", "icon": "images/vue-logo.png", - "version": "2.2.1", + "version": "3.2.0", "publisher": "sdras", "engines": { "vscode": "^1.14.0" @@ -23,9 +23,6 @@ "Composition API", "Vue Snippets" ], - "extensionDependencies": [ - "octref.vetur" - ], "categories": [ "Snippets" ], @@ -51,6 +48,10 @@ "language": "javascript", "path": "./snippets/vue-script.json" }, + { + "language": "javascript", + "path": "./snippets/vue-script-setup.json" + }, { "language": "javascript", "path": "./snippets/vue-script-vuex.json" diff --git a/snippets/vue-script-setup.json b/snippets/vue-script-setup.json new file mode 100644 index 0000000..c0de1d2 --- /dev/null +++ b/snippets/vue-script-setup.json @@ -0,0 +1,40 @@ +{ + "Vue SFC Script Setup (Composition API)": { + "prefix": ["vbase-3-script-setup", "vbase-3-ss"], + "body": [ + "", + "", + "", + "", + "" + ], + "description": "Base for Vue Single File Component Script Setup (Composition API)" + }, + "Vue SFC Script Setup with TypeScript (Composition API)": { + "prefix": ["vbase-3-script-setup-ts", "vbase-3-ss-ts"], + "body": [ + "", + "", + "", + "", + "" + ], + "description": "Base for Vue Single File Component Script Setup with TypeScript (Composition API)" + } +}