Skip to content

Commit 532b110

Browse files
committed
fix(short-names): make it possible for short-names to be muliple words
1 parent 632973c commit 532b110

11 files changed

+13513
-593
lines changed

dist/colornames.short.csv

+1,616-1
Large diffs are not rendered by default.

dist/colornames.short.esm.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/colornames.short.esm.mjs

+1-1
Large diffs are not rendered by default.

dist/colornames.short.html

+1-1
Large diffs are not rendered by default.

dist/colornames.short.json

+1-1
Large diffs are not rendered by default.

dist/colornames.short.min.json

+1-1
Large diffs are not rendered by default.

dist/colornames.short.scss

+1-1
Large diffs are not rendered by default.

dist/colornames.short.umd.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/colornames.short.xml

+7,030-570
Large diffs are not rendered by default.

dist/colornames.short.yaml

+4,854-9
Large diffs are not rendered by default.

scripts/build.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ const JSONExportStringShort = JSON.stringify(
127127
// make sure its only one word long
128128
(val) =>
129129
val[bestOfKey] &&
130-
val.name.split(" ").length === 1 &&
131-
val.name.length < maxShortNameLength
130+
//val.name.split(" ").length === 1 &&
131+
val.name.length < maxShortNameLength + 1
132132
)
133133
.map(
134134
// removes good name attributes
@@ -170,8 +170,8 @@ const miniJSONExportObjBestOf = colorsSrc.entires.reduce((obj, entry) => {
170170
const miniJSONExportObjShort = colorsSrc.entires.reduce((obj, entry) => {
171171
if (
172172
entry[bestOfKey] &&
173-
entry.name.split(" ").length === 1 &&
174-
entry.name.length < maxShortNameLength
173+
//entry.name.split(" ").length === 1 &&
174+
entry.name.length < maxShortNameLength + 1
175175
) {
176176
obj[entry.hex.replace("#", "")] = entry.name;
177177
}
@@ -327,8 +327,8 @@ for (const outputFormat in outputFormats) {
327327
colorsSrc.entires.filter(
328328
(val) =>
329329
val[bestOfKey] &&
330-
val.name.split(" ").length === 1 &&
331-
val.name.length < maxShortNameLength
330+
//val.name.split(" ").length === 1 &&
331+
val.name.length < maxShortNameLength + 1
332332
),
333333
csvKeys,
334334
outputFormats[outputFormat]

0 commit comments

Comments
 (0)