mirror of
https://github.com/FormidableLabs/webpack-dashboard.git
synced 2026-01-18 14:18:05 +00:00
27 lines
484 B
JavaScript
27 lines
484 B
JavaScript
"use strict";
|
|
|
|
const chalk = require("chalk");
|
|
const Handlebars = require("handlebars");
|
|
|
|
const template = Handlebars.compile(
|
|
`${chalk.yellow(chalk.underline("Version skews"))}
|
|
|
|
{{#each versions}}
|
|
{{name}}:
|
|
{{#each versions}}
|
|
{{@key}}:
|
|
{{#each this}}
|
|
- {{{this}}}
|
|
{{/each}}
|
|
{{/each}}
|
|
{{/each}}
|
|
`);
|
|
|
|
function formatVersions(versions) {
|
|
return versions.versions.length && template({
|
|
versions: versions.versions
|
|
}) || "";
|
|
}
|
|
|
|
module.exports = formatVersions;
|