kalamuna / kalastatic

:electric_plug: Facilitate the front-end experience through Styleguides and Prototypes
https://kalamuna.github.io/kalastatic/
41 stars 14 forks source link

Issues with JSON inclusion #475

Open thiagodemellobueno opened 7 years ago

thiagodemellobueno commented 7 years ago
  1. We only have the kalastatic namespace working for this feature, it breaks on @atoms/@molecules/@organisms

  2. Currently if you enter the wrong path, it sometimes does not error... eg string(46) "@kalastatic/organisms/page-hero/page-hero.json" fails silently.... should be string(46) "@kalastatic/COMPONENTS/organisms/page-hero/page-hero.json" ... but being told that the json file in question is not found would avoid long debugging spells.

RobLoach commented 7 years ago

In order to keep performance up, it just checks for one prefixing string... Right now it's @kalastatic/ at the beginning. inheritFilePrefix at: https://github.com/kalamuna/metalsmith-metadata-files#configuration

@kalastatic in this case is not a namespace, but a trigger. It's a trick :wink: ... We could extend it to discover a path, however. Worth considering and brainstorming.