Skip to content
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

docs: Add "Babel Plugin Macros" guide #9963

Merged
merged 3 commits into from
Nov 16, 2018

Conversation

jgierer12
Copy link
Contributor

@jgierer12 jgierer12 commented Nov 16, 2018

Some thoughts:

  • Rename to Babel Macros? This guide is more about the macros themselves than the plugin.
  • Elaborate on the fact that the plugin is included with Gatsby, and has to be installed manually when using macros in a non-Gatsby project?
  • Add instructions for some common macros? (preval, codegen, tagged-translations, ...)
    This might get too long, and is pretty well described in the docs of each macro.
  • Technically, the output of the preval example would be var x = 1. But I'm not sure if that would be too confusing since it doesn't have anything to do with the preval macro itself.

@jgierer12 jgierer12 added type: documentation An issue or pull request for improving or updating Gatsby's documentation status: WIP labels Nov 16, 2018
@jgierer12 jgierer12 requested a review from a team November 16, 2018 00:36
@KyleAMathews
Copy link
Contributor

Reads great! I don't think it's necessary to make clear it's not installed by default in other frameworks as this is an advanced feature so most people reading it would be able to figure this out, probably.

I'll merge this now but if you'd like to do a follow-up PR listing some other popular plugins, that'd be great!

@KyleAMathews KyleAMathews merged commit 7e17cfd into gatsbyjs:master Nov 16, 2018
pieh pushed a commit that referenced this pull request Nov 16, 2018
Sorry, didn't realize this had to be updated manually...

Related to #9963
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
* Add "Babel Plugin Macros" guide

* Run Prettier

* Update babel-plugin-macros.md
gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
Sorry, didn't realize this had to be updated manually...

Related to gatsbyjs#9963
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation An issue or pull request for improving or updating Gatsby's documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants