Skip to content

Commit

Permalink
fix(short-names): make it possible for short-names to be muliple words
Browse files Browse the repository at this point in the history
  • Loading branch information
meodai committed Aug 25, 2024
1 parent 632973c commit 532b110
Show file tree
Hide file tree
Showing 11 changed files with 13,513 additions and 593 deletions.
1,617 changes: 1,616 additions & 1 deletion dist/colornames.short.csv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/colornames.short.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/colornames.short.esm.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/colornames.short.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/colornames.short.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/colornames.short.min.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/colornames.short.scss

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/colornames.short.umd.js

Large diffs are not rendered by default.

7,600 changes: 7,030 additions & 570 deletions dist/colornames.short.xml

Large diffs are not rendered by default.

4,863 changes: 4,854 additions & 9 deletions dist/colornames.short.yaml

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions scripts/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ const JSONExportStringShort = JSON.stringify(
// make sure its only one word long
(val) =>
val[bestOfKey] &&
val.name.split(" ").length === 1 &&
val.name.length < maxShortNameLength
//val.name.split(" ").length === 1 &&
val.name.length < maxShortNameLength + 1
)
.map(
// removes good name attributes
Expand Down Expand Up @@ -170,8 +170,8 @@ const miniJSONExportObjBestOf = colorsSrc.entires.reduce((obj, entry) => {
const miniJSONExportObjShort = colorsSrc.entires.reduce((obj, entry) => {
if (
entry[bestOfKey] &&
entry.name.split(" ").length === 1 &&
entry.name.length < maxShortNameLength
//entry.name.split(" ").length === 1 &&
entry.name.length < maxShortNameLength + 1
) {
obj[entry.hex.replace("#", "")] = entry.name;
}
Expand Down Expand Up @@ -327,8 +327,8 @@ for (const outputFormat in outputFormats) {
colorsSrc.entires.filter(
(val) =>
val[bestOfKey] &&
val.name.split(" ").length === 1 &&
val.name.length < maxShortNameLength
//val.name.split(" ").length === 1 &&
val.name.length < maxShortNameLength + 1
),
csvKeys,
outputFormats[outputFormat]
Expand Down

0 comments on commit 532b110

Please sign in to comment.