UNPKG

@awesome-fe/translate

Version:
25 lines 960 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getExporterFor = void 0; const path_1 = require("path"); const html_exporter_1 = require("./html-exporter"); const angular_json_exporter_1 = require("./angular-json-exporter"); const subtitle_exporter_1 = require("./subtitle-exporter"); const markdown_exporter_1 = require("./markdown-exporter"); function getExporterFor(filename) { const ext = (0, path_1.extname)(filename); switch (ext) { case '.html': return new html_exporter_1.HtmlExporter(); case '.md': case '.markdown': return new markdown_exporter_1.MarkdownExporter(); case '.json': return new angular_json_exporter_1.AngularJsonExporter(); case '.vtt': case '.srt': return new subtitle_exporter_1.SubtitleExporter(); } } exports.getExporterFor = getExporterFor; //# sourceMappingURL=get-exporter-for.js.map