Remove the copy of export plans in generate-release-notes
This commit is contained in:
parent
600f0823fe
commit
7853e97e62
3 changed files with 249 additions and 235 deletions
|
@ -7,7 +7,8 @@ const execMain = require("../shared/execMain");
|
|||
|
||||
const ChangeFileDir = path.join(__dirname, "../../changes");
|
||||
const Version = process.argv[2];
|
||||
const outputPath = process.argv[3];
|
||||
const releasePackagesJsonPath = process.argv[3];
|
||||
const outputPath = process.argv[4];
|
||||
|
||||
execMain(main);
|
||||
|
||||
|
@ -68,59 +69,29 @@ async function GenerateChangeList(out) {
|
|||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// PACKAGE LIST
|
||||
|
||||
const PackageShapes = {
|
||||
// shapeDesc, shapeNameSuffix, slab, count, nospace
|
||||
"": ["Monospace, Default", "", false, true],
|
||||
slab: ["Monospace, Slab", "Slab", true, true],
|
||||
curly: ["Monospace, Curly", "Curly", false, true],
|
||||
"curly-slab": ["Monospace, Curly Slab", "Curly Slab", true, true],
|
||||
ss01: ["Monospace, Andale Mono Style", "SS01"],
|
||||
ss02: ["Monospace, Anonymous Pro Style", "SS02"],
|
||||
ss03: ["Monospace, Consolas Style", "SS03"],
|
||||
ss04: ["Monospace, Menlo Style", "SS04"],
|
||||
ss05: ["Monospace, Fira Mono Style", "SS05"],
|
||||
ss06: ["Monospace, Liberation Mono Style", "SS06"],
|
||||
ss07: ["Monospace, Monaco Style", "SS07"],
|
||||
ss08: ["Monospace, Pragmata Pro Style", "SS08"],
|
||||
ss09: ["Monospace, Source Code Pro Style", "SS09"],
|
||||
ss10: ["Monospace, Envy Code R Style", "SS10"],
|
||||
ss11: ["Monospace, X Windows Fixed Style", "SS11"],
|
||||
ss12: ["Monospace, Ubuntu Mono Style", "SS12"],
|
||||
ss13: ["Monospace, Lucida Style", "SS13"],
|
||||
ss14: ["Monospace, JetBrains Mono Style", "SS14"],
|
||||
aile: ["Quasi-proportional, Sans-serif", "Aile", false, false, true],
|
||||
etoile: ["Quasi-proportional, Slab-serif", "Etoile", false, false, true],
|
||||
sparkle: ["Quasi-proportional Hybrid, like iA Writer’s Duo.", "Sparkle", false, false, true]
|
||||
};
|
||||
|
||||
const MonospaceSpacings = {
|
||||
const Spacings = {
|
||||
// spacingDesc, ligation, spacingNameSuffix
|
||||
"": ["Default", true, ""],
|
||||
type: ["Default", true, ""],
|
||||
term: ["Terminal", true, "Term"],
|
||||
fixed: ["Fixed", false, "Fixed"]
|
||||
};
|
||||
const ProportionalSpacings = {
|
||||
"": ["Default", false, ""]
|
||||
};
|
||||
|
||||
const imagePrefix = `https://raw.githubusercontent.com/be5invis/Iosevka/v${Version}/images`;
|
||||
|
||||
async function GeneratePackageList(out) {
|
||||
const MockRows = 4;
|
||||
const pkgShapesData = await fs.readJson(releasePackagesJsonPath);
|
||||
|
||||
out.log(`<table>`);
|
||||
for (let shape in PackageShapes) {
|
||||
const [shapeDesc, shapeNameSuffix, , count, proportional] = PackageShapes[shape];
|
||||
const spacings = proportional ? ProportionalSpacings : MonospaceSpacings;
|
||||
const spacingKeys = Object.keys(spacings);
|
||||
for (let [groupID, gr] of Object.entries(pkgShapesData)) {
|
||||
const prime = gr.subGroups[groupID];
|
||||
|
||||
const familyName = buildName("\u00a0", "Iosevka", shapeNameSuffix);
|
||||
const imageName = buildName("-", "iosevka", shape);
|
||||
const fileName = buildName("-", "ttc", "iosevka", shape, Version);
|
||||
const familyName = buildName("\u00a0", ...prime.family.split(" "));
|
||||
const fileName = buildName("-", "ttc", groupID, Version);
|
||||
const downloadLink = `https://github.com/be5invis/Iosevka/releases/download/v${Version}/${fileName}.zip`;
|
||||
|
||||
const desc = `<i>${shapeDesc}</i>`;
|
||||
const img = `<img src="${imagePrefix}/${imageName}.png"/>`;
|
||||
const proportionPrefix = gr.quasiProportional ? "Quasi-proportional" : "Monospace";
|
||||
const desc = `<i>${proportionPrefix}, ${prime.desc}</i>`;
|
||||
const img = `<img src="${imagePrefix}/${groupID}.png"/>`;
|
||||
out.log(
|
||||
`<tr>`,
|
||||
`<td colspan="5"><b>📦 ${familyName}</b> — ${desc}</td>`,
|
||||
|
@ -136,20 +107,21 @@ async function GeneratePackageList(out) {
|
|||
`<td colspan="3"><b>Downloads</b></td>`,
|
||||
`</tr>`
|
||||
);
|
||||
for (let spacing of spacingKeys) {
|
||||
const [spacingDesc, ligation, spacingNameSuffix] = spacings[spacing];
|
||||
const familyName = buildName(" ", "Iosevka", spacingNameSuffix, shapeNameSuffix);
|
||||
let lastSubGroupID = null;
|
||||
for (const [subGroupID, subGr] of Object.entries(gr.subGroups)) {
|
||||
lastSubGroupID = subGroupID;
|
||||
}
|
||||
for (const [subGroupID, subGr] of Object.entries(gr.subGroups)) {
|
||||
const [spacingDesc, ligation] = Spacings[subGr.spacing];
|
||||
const createLink = (label, prefix) => {
|
||||
const fileName = buildName("-", prefix, "iosevka", spacing, shape, Version);
|
||||
const fileName = buildName("-", prefix, subGroupID, Version);
|
||||
const downloadLink = `https://github.com/be5invis/Iosevka/releases/download/v${Version}/${fileName}.zip`;
|
||||
return `<b><a href="${downloadLink}">${label}</a></b>`;
|
||||
};
|
||||
const leader =
|
||||
" " +
|
||||
(spacing === spacingKeys[spacingKeys.length - 1] ? "└" : "├");
|
||||
const leader = " " + (subGroupID === lastSubGroupID ? "└" : "├");
|
||||
out.log(
|
||||
`<tr>`,
|
||||
`<td>${leader} <b>${noBreak(familyName)}</b></td>`,
|
||||
`<td>${leader} <b>${noBreak(subGr.family)}</b></td>`,
|
||||
`<td>${spacingDesc}</td>`,
|
||||
`<td>${flag(ligation)}</td>`,
|
||||
`<td>${createLink("TTF", "ttf")}</td>`,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue