indexTemplates() {
        return __awaiter(this, void 0, void 0, function* () {
            this.clearTemplateCommands();
            const templates = (yield this.templates.getTemplates(this.settings.templateDirectory)) || [];
            console.log("Got templates: ", templates.map(c => c.path).join(", "));
            templates.forEach((t) => __awaiter(this, void 0, void 0, function* () {
                if (t) {
                    const ts = (yield t);
                    const command = this.addCommand({
                        id: ts.id,
                        name: ts.name,
                        editorCallback: (editor, _) => __awaiter(this, void 0, void 0, function* () { this.launchTemplate(editor, ts); })
                    });
                    this.addedCommands.push(command.id);
                }
            }));
        });
    }
// Adds all the template commands - calls getTemplates which looks for files in the settings.templateDirectory
Adds all the template commands - calls getTemplates which looks for files in the settings.templateDirectory
Adds all the template commands - calls getTemplates which looks for files in the settings . templateDirectory
indexTemplates() {
        return __awaiter(this, void 0, void 0, function* () {
            this.clearTemplateCommands();
            const templates = (yield this.templates.getTemplates(this.settings.templateDirectory)) || [];
            console.log("Got templates: ", templates.map(c => c.path).join(", "));
            templates.forEach((t) => __awaiter(this, void 0, void 0, function* () {
                if (t) {
                    const ts = (yield t);
                    const command = this.addCommand({
                        id: ts.id,
                        name: ts.name,
                        editorCallback: (editor, _) => __awaiter(this, void 0, void 0, function* () { this.launchTemplate(editor, ts); })
                    });
                    this.addedCommands.push(command.id);
                }
            }));
        });
    }
indexTemplates ( ) { return __awaiter ( this , void 0 , void 0 , function * ( ) { this . clearTemplateCommands ( ) ; const templates = ( yield this . templates . getTemplates ( this . settings . templateDirectory ) ) || [ ] ; console . log ( "Got templates: " , templates . map ( c => c . path ) . join ( ", " ) ) ; templates . forEach ( ( t ) => __awaiter ( this , void 0 , void 0 , function * ( ) { if ( t ) { const ts = ( yield t ) ; const command = this . addCommand ( { id : ts . id , name : ts . name , editorCallback : ( editor , _ ) => __awaiter ( this , void 0 , void 0 , function * ( ) { this . launchTemplate ( editor , ts ) ; } ) } ) ; this . addedCommands . push ( command . id ) ; } } ) ) ; } ) ; }
Adds all the template commands - calls getTemplates which looks for files in the settings.templateDirectory
Adds all the template commands - calls getTemplates which looks for files in the settings . templateDirectory