phase2 / drupal-lab

A sample Drupal 8 site with a Pattern Lab Twig powered theme.
GNU General Public License v2.0
60 stars 22 forks source link

Convert sidecar data files from JSON to YAML #5

Open EvanLovely opened 8 years ago

EvanLovely commented 8 years ago

Let's move over to this format!

EvanLovely commented 8 years ago

This npm utility would be very helpful and we could use this command to convert:

json2yaml --recursive --save --depth 4 source/_patterns/

Give special attention to patterns using the Data Transform plugin, perhaps leaving them in JSON if needed. The goal isn't total conversion, just highlighting a different way we can do the data files.

Also, the extension .yml doesn't work, only .yaml does. I've made an issue for that: https://github.com/pattern-lab/patternlab-php-core/issues/25

EvanLovely commented 8 years ago

OK, that PR's been merged and we can now use yml instead of yaml! Let's use the shorter as that's what Drupal uses and also PL's own config/config.yml.

Relevant PR: https://github.com/phase2/drupal-lab/pull/15