pattern-lab / patternlab-php-core

This repository provides the core functionality for Pattern Lab. It is meant to be used from within an Edition with a PatternEngine and StarterKit.
http://patternlab.io/
MIT License
43 stars 62 forks source link

More Helpful JSON / YAML Error Messages + Minor cleanup of JSON / YAML related variables in Pattern Rules #148

Open sghoweri opened 7 years ago

sghoweri commented 7 years ago

Now passing in the actual filename + path to the JSON and YAML file functions so errors are more helpful + easier to debug.

This small change makes a huge difference in projects like the Bolt Design System I run (where we're installing, versioning and publishing individual components) given that Pattern Lab by default tries to pick up deeply nested files in our component-specific node_modules folders which, unless / until patched, can often cause fatal errors w/ Pattern Lab that are close to near impossible to track down otherwise.

better_json_errors_-_before better_json_errors_-_after

CC @aleksip