On branch [feat/add-new-gray](https://github.com/RedHat-UX/red-hat-design-tokens/tree/feat/add-new-grays)
Run npm run start
[11ty] File changed: css/global.css (skips build)
[11ty] Problem writing Eleventy templates: (more in DEBUG output)
[11ty] 1. Having trouble rendering njk template ./docs/index.html (via TemplateContentRenderError)
[11ty] 2. (./docs/index.html)
[11ty] EleventyShortcodeError: Error with Nunjucks shortcode `category` (via Template render error)
[11ty] 3. Cannot use 'in' operator to search for '$value' in null (via Template render error)
[11ty]
[11ty] Original error stack trace: TypeError: Cannot use 'in' operator to search for '$value' in null
[11ty] at /Users/sps/Sites/_rhds/red-hat-design-tokens/plugins/11ty.cjs:48:24
A fix seemingly seems to be checking if val === null in getFilePathGuess in plugins/11ty.cjs:48
/** Try to get the path to a token source file. Not all object values in a token collection have that metadata attached */
function getFilePathGuess(collection) {
return Object.values(collection).reduce((path, val) =>
path || typeof val !== 'object' || val === null ? path
: '$value' in val ? val.filePath
: getFilePathGuess(val), '');
}
Havent dug deep enough to validate if that is all that needs to be done or why we have a null val.
On branch
[feat/add-new-gray](https://github.com/RedHat-UX/red-hat-design-tokens/tree/feat/add-new-grays)
Run
npm run start
A fix seemingly seems to be checking if
val === null
ingetFilePathGuess
in plugins/11ty.cjs:48Havent dug deep enough to validate if that is all that needs to be done or why we have a null
val
.