Smarter YAML front matter parser, used by metalsmith, Gatsby, Netlify, Assemble, mapbox-gl, phenomic, vuejs vitepress, TinaCMS, Shopify Polaris, Ant Design, Astro, hashicorp, garden, slidev, saber, sourcegraph, and many others. Simple to use, and battle tested. Parses YAML by default but can also parse JSON Front Matter, Coffee Front Matter, TOML Front Matter, and has support for custom parsers. Please follow gray-matter's author: https://github.com/jonschlinkert
Hey, thanks for the awesome package! I love that I can parse/stringify both ways with it.
I have an encountered a problem when using gray-matter with Browserify for the browser:
Error: Cannot find module 'toml' from '/.../node_modules/gray-matter/lib'
Error: Cannot find module 'coffee-script' from '/.../node_modules/gray-matter/lib'
The issue is obviously resolved when coffee-script and toml are installed. If I understand correctly, Node supports dynamic requires here, while Browserify bundles everything right away. What could be the optimal solution? Maybe moving parsers out of the module and allowing the user to require/set his own? I guess PR #15 solves this.
Hey, thanks for the awesome package! I love that I can parse/stringify both ways with it.
I have an encountered a problem when using gray-matter with Browserify for the browser:
The issue is obviously resolved when coffee-script and toml are installed. If I understand correctly, Node supports dynamic requires here, while Browserify bundles everything right away. What could be the optimal solution? Maybe moving parsers out of the module and allowing the user to require/set his own? I guess PR #15 solves this.
Thanks!