diff --git a/.gitignore b/.gitignore index cab290e..929ffd7 100644 --- a/.gitignore +++ b/.gitignore @@ -104,3 +104,5 @@ dist .tern-port package-lock.json + +.vscode-test/* diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..229dbfc --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Extension", + "type": "extensionHost", + "request": "launch", + "args": [ + "test.js", + "--disable-extensions", + "--extensionDevelopmentPath=${workspaceFolder}" + ] + } + ] +} \ No newline at end of file diff --git a/README.md b/README.md index 4c38f62..b7e898b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # fastify-snippet -Some [VSCode](https://code.visualstudio.com/) snippet about Fastify +Some [VSCode](https://code.visualstudio.com/) snippets about Fastify -Look at the [`.vscode/fastify-snippet.code-snippets`](./.vscode/fastify-snippet.code-snippets) file and COPY-PASTE it in your project or your global configuration +Install it from your VSCODE plugin page! For more information, take a look a the [VSCode documentation](https://code.visualstudio.com/docs/editor/userdefinedsnippets) diff --git a/images/logo-256.png b/images/logo-256.png new file mode 100644 index 0000000..72d5118 Binary files /dev/null and b/images/logo-256.png differ diff --git a/package.json b/package.json index aed0122..79fcece 100644 --- a/package.json +++ b/package.json @@ -1,26 +1,50 @@ { - "name": "fastify-snippet", + "name": "fastify-snippets", "version": "1.0.0", - "description": "Some VSCode snippet about Fastify", - "main": "index.js", + "icon": "images/logo-256.png", + "displayName": "Fastify Snippets", + "description": "Make your Fastify developing even faster", + "publisher": "fastify", "scripts": { - "build:toc": "node toc" + "build:toc": "node toc", + "vscode:login": "vsce login fastify", + "vscode:publish": "vsce publish", + "test": "tap --no-timeout test/**.test.js" + }, + "engines": { + "vscode": "^1.40.0" + }, + "categories": [ + "Snippets" + ], + "contributes": { + "snippets": [ + { + "language": "javascript", + "path": "./snippets-js.json" + }, + { + "language": "typescript", + "path": "./snippets-ts.json" + } + ] }, "repository": { "type": "git", "url": "git+https://github.com/Eomm/fastify-snippet.git" }, - "keywords": [], + "keywords": [ + "vscode", + "vscode-snippet", + "snippet", + "snippets", + "fastify", + "productivity" + ], "author": "Manuel Spigolon (https://github.com/Eomm)", "license": "MIT", "bugs": { "url": "https://github.com/Eomm/fastify-snippet/issues" }, - "homepage": "https://github.com/Eomm/fastify-snippet#readme", - "dependencies": { - "fastify": "^3.14.2" - }, - "devDependencies": { - "standard": "^16.0.3" - } + "homepage": "https://github.com/Eomm/fastify-snippet#readme" } diff --git a/.vscode/fastify-snippet.code-snippets b/snippets/snippets-js.json similarity index 100% rename from .vscode/fastify-snippet.code-snippets rename to snippets/snippets-js.json diff --git a/snippets/snippets-ts.json b/snippets/snippets-ts.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/snippets/snippets-ts.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/toc.js b/toc.js index 3c00429..d0d39dd 100644 --- a/toc.js +++ b/toc.js @@ -4,7 +4,7 @@ const fs = require('fs') const readme = fs.readFileSync('./README.md', 'utf8') -const snippet = JSON.parse(fs.readFileSync('./.vscode/fastify-snippet.code-snippets')) +const snippet = require('./snippets/snippets-js.json') const content = Object.entries(snippet) const rows = content.map(([snippet, descriptor]) => {