Skip to content

Instantly share code, notes, and snippets.

@NeilW
Last active May 27, 2019 21:30
Show Gist options
  • Save NeilW/351279a0a7ee44a27d8360e00cf07d9e to your computer and use it in GitHub Desktop.
Save NeilW/351279a0a7ee44a27d8360e00cf07d9e to your computer and use it in GitHub Desktop.
YAML2JSON: Auto makefile rule to create JSON files from YAML files
%.json : %.yaml
ruby -rjson -ryaml -e "puts JSON.pretty_generate(YAML.load(ARGF.read))" $< > $@
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment