UNPKG

alm

Version:

The best IDE for TypeScript

20 lines (19 loc) 729 B
"use strict"; /** * Commands to create common configuration files */ Object.defineProperty(exports, "__esModule", { value: true }); var commands = require("../commands/commands"); var ui = require("../ui"); var socketClient_1 = require("../../socket/socketClient"); commands.createEditorconfig.on(function () { socketClient_1.server.createEditorconfig({}).then(function (res) { if (res.alreadyPresent) { ui.notifyWarningNormalDisappear('There is already an .editorconfig. Opened that for you instead.'); commands.doOpenOrFocusFile.emit({ filePath: res.alreadyPresent }); } else { ui.notifySuccessNormalDisappear('Created an .editorconfig'); } }); });