From 0cca25a118666777586f60d5c9a58110e5006f1e Mon Sep 17 00:00:00 2001 From: Lea Verou Date: Mon, 17 Mar 2025 09:32:07 -0400 Subject: [PATCH] Move log to utils --- docs/assets/scripts/tweak/util.js | 5 +++++ docs/docs/palettes/app/tweak.js | 8 ++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docs/assets/scripts/tweak/util.js b/docs/assets/scripts/tweak/util.js index e5d83acbb..acf7028cc 100644 --- a/docs/assets/scripts/tweak/util.js +++ b/docs/assets/scripts/tweak/util.js @@ -297,3 +297,8 @@ export function slugify(str) { .replace(/\s+/g, '-') // Convert whitespace to hyphens .toLowerCase(); } + +export function log(...args) { + console.log(...args); + return args[0]; +} diff --git a/docs/docs/palettes/app/tweak.js b/docs/docs/palettes/app/tweak.js index 2edec45ef..aff0153d6 100644 --- a/docs/docs/palettes/app/tweak.js +++ b/docs/docs/palettes/app/tweak.js @@ -29,7 +29,7 @@ import { ROLES, tints, } from '/assets/scripts/tweak/data.js'; -import { camelCase, capitalize, slugify, subtractAngles } from '/assets/scripts/tweak/util.js'; +import { camelCase, capitalize, log, slugify, subtractAngles } from '/assets/scripts/tweak/util.js'; const percentFormatter = value => value.toLocaleString(undefined, { style: 'percent' }); @@ -769,11 +769,7 @@ let paletteAppSpec = { capitalize, slugify, getMaxChroma, - - log(...args) { - console.log(...args); - return args[0]; - }, + log, /** * Testing method. Import all core colors from a given palette.