Closed jpyams closed 6 years ago
Hi @jpyams, I think you don't need to wrap it around with promise. I was recently creating a plugin for gatsby-transform-remark too, and I can see my console.log print out in the terminal (not the web browser's console).
Since there is no documentation, I basically take gatsby-remark-prismjs and gatsby-remark-emojis as a reference to develop plugin, hope it helps.
Thanks @tri613! Gettting rid of the Promise
made it so I could see the output and figuring out what was going on.
Looking at the contents of markdownAST
, it looks like a plugin is the wrong approach for what I'm doing.
Summary
I'm trying to develop a plugin for
gatsby-transform-remark
to obfuscate contact info from spambots. However, I haven't been able to make the plugin actually affect the page in any way.console.log()
s within thePromise
don't seem to print out anywhere.I'm pretty sure I've loaded the plugin properly, since if I add an unmatched brace Gatsby fails with an error.
Is there a way to get printout information from a plugin like this while testing? Or am I doing something else wrong that's preventing the
Promise
code from running properly?Is there any documentation on making a plugin for a plugin such as
gatsby-transform-remark
?My code (in plugins/gatsby-remark-hide-contact)
index.js