sourcejs / Source

[ON HOLD] Living Style Guides Engine and Maintenance Environment for Front-end Components. Core repository.
http://sourcejs.com
MIT License
548 stars 49 forks source link

Parse common meta fields form package.json or bower.json #131

Open robhrt7 opened 9 years ago

robhrt7 commented 9 years ago

To not repeat some of the fields like title, description, keywords in info.json, we may parse this info from package.json and bower.json following commonJS standard.

This will allow not having info.json at all, so we need to think on how to determine if directory could be rendered as Spec page. Here's some draft checking logic:

  1. Check if it has info.json
  2. If not, check if it has package.json + some of spec templates like README.md, index.src and etc.
robhrt7 commented 9 years ago

@dragosh

mik01aj commented 9 years ago

related: you could have metadata in your markdown like https://github.com/jaredly/demobox/blob/master/demo.md

robhrt7 commented 9 years ago

@mik01aj agree, it's also a nice option to use. I'll definetly come up with something similiar in 0.6.0

ndelangen commented 8 years ago

I'm not sure adding metadata reading support from package.json and the likes will do us too much good.

I definitely like the idea of embedding this metadata into the spec-file itself. I've seen some static site generators use a small bit a YML at the top of an html / liquid file for metadata. I think this is a superior way of adding metadata.