Skip to content

Commit

Permalink
Update lib/utils/combineJSON.js
Browse files Browse the repository at this point in the history
Co-authored-by: Joren Broekema <[email protected]>
  • Loading branch information
hsjobeki and jorenbroekema authored Nov 15, 2024
1 parent 459a930 commit aa25f53
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/utils/combineJSON.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,9 +125,8 @@ export default async function combineJSON(
// Use json parser fallback by default
// Other file types like .hjson, .topojson, or .ndjson, might be handled with dedicated parsers in the future.
// This warning is here to hint users that their file is parsed with the standard JSON5 parser and not any dedicated parser.
// Users should open an issue and provide the use case that caused the issue so we can investigate if we should allow users to inject custom parsers or add dedicated support.
console.warn(
`Unrecognized file extension: ${extname(filePath)}. Using JSON5 parser. If you see this open an issue on the Style Dictionary GitHub: https://github.com/amzn/style-dictionary/issues`,
`Unrecognized file extension: ${extname(filePath)}. Using JSON5 parser as a default. Alternatively, create a custom parser to handle this filetype https://styledictionary.com/reference/hooks/parsers/`,
);
file_content = JSON5.parse(
/** @type {string} */ (volume.readFileSync(resolvedPath, 'utf-8')),
Expand Down

0 comments on commit aa25f53

Please sign in to comment.