-
-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
request: make gray-matter
natively, backwards-compatible with older browsers
#49
Comments
gray-matter
cannot be used outside of Node.JSgray-matter
natively, backwards-compatible with older browsers
Hi, gray-matter is after all a node.js module. I might consider dropping What is the reason for using gray-matter in the browser? |
@jonschlinkert The actual project that we are using it for is Netlify CMS. You had suggested that we switch back to |
You also make a good point about the |
I care if it's a use case consistent with why we created the module, which was to support static site generators. I think your use case is consistent with that. I can start by reverting to |
@jonschlinkert That sounds good. Just as long as the module in general stays browser-compatible and doesn't use any Node-specific things, that will be awesome! |
@jonschlinkert Another way that would work for us if you don't want to change the sources would be to have a re-packaged version for browsers that was run through Babel or something like that and left out the Node functions like |
k fixed and published as 3.0.4. I'll create a new issue to discuss fs. |
Template strings are a new browser feature as well. |
good catch |
gray-matter
uses features of Node that are not supported in all browsers (e.g.let
,const
,fs
module). This is a big downside, as the entiregray-matter
module must be run through something like Babel to work. Even then, it would fail while importing thefs
module. Would you consider supporting this, maybe with a pre-built version ofgray-matter
that can be used on the web?The text was updated successfully, but these errors were encountered: