From 0f86372020d90e704f6932ccede383c0402f084c Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Thu, 10 Dec 2020 11:11:18 +0100 Subject: [PATCH] MOBILE-3320 DX: Add project snippets for vscode --- .vscode/moodle.code-snippets | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .vscode/moodle.code-snippets diff --git a/.vscode/moodle.code-snippets b/.vscode/moodle.code-snippets new file mode 100644 index 000000000..17126a06d --- /dev/null +++ b/.vscode/moodle.code-snippets @@ -0,0 +1,22 @@ +{ + "[Moodle] Service Singleton": { + "scope": "typescript", + "prefix": "massingleton", + "body": [ + + "import { Injectable } from '@angular/core';", + "import { makeSingleton } from '@singletons';", + "", + "@Injectable({ providedIn: 'root' })", + "export class ${1:${TM_FILENAME_BASE}}Service {", + "", + " $0", + "", + "}", + "", + "export class ${1:${TM_FILENAME_BASE}} extends makeSingleton(${1:${TM_FILENAME_BASE}}Service) {}", + "" + ], + "description": "[Moodle] Create a Service Singleton" + } +}