UNPKG

webmat

Version:

Formats your entire project with clang-format

21 lines 913 B
"use strict"; /** * @license * Copyright (c) 2018 Google Inc. All rights reserved. * This code may only be used under the BSD style license found at * http://polymer.github.io/LICENSE.txt * Code distributed by Google as part of this project is also * subject to an additional IP rights grant found at * http://polymer.github.io/PATENTS.txt */ Object.defineProperty(exports, "__esModule", { value: true }); const cli_1 = require("./cli"); const format_1 = require("./format"); async function run() { const [defaultConfig, userConfig] = await Promise.all([cli_1.readConfigFile(cli_1.DEFAULT_CONFIG_FILENAME), cli_1.readConfigFile()]); const activeConfig = cli_1.resolveConfigs(defaultConfig, userConfig); const filesToFormat = await format_1.getFilesToFormat(activeConfig); await format_1.formatFiles(filesToFormat, activeConfig.style); } exports.run = run; //# sourceMappingURL=index.js.map