wongx
wongx

Reputation: 11859

Under Unifiedjs ecosystem, what does RECMA stand for?

So when parsing mdx, you typically use remark plugins for markdown, and rehype plugins for HTML. I see a third category called recma plugins. What does recma stand for and what is it? Google surprisingly has no results on this.

For example, this plugin: https://github.com/remcohaszing/recma-nextjs-static-props

Upvotes: 4

Views: 528

Answers (1)

ScottWelker
ScottWelker

Reputation: 2074

Unless someone knows better, I assert that 'recma' is a cutsie overloading of the letter 'e' yielding Remark (re) and ECMAScript (ecma). I have an interest in this topic so I dug as deep as my free time would allow.

Here are the more citable references I was able to find:

  1. docs.astro.build: recmaPlugins:
    • recmaPlugins: These are plugins that modify the output estree directly. This is useful for modifying or injecting JavaScript variables in your MDX files.
  2. GitHub: #2030 Provide recma packages similar to remark:
    • What plugin are you making?
      • A plugin which makes all global variables available in pages/_app.js in Next.js projects by injecting getStaticProps.
  3. mdxjs: options.recmaPlugins:
  4. npmjs: xdm, Compilers, Babel:
    • recma plugins are a new ecosystem currently in beta to transform esast trees (JavaScript).
  5. Github: recma-nextjs-static-props:
    • Is a minimal Next.js project...
    • Exposes Next.js applications' top-level scope Identifiers...
    • Generates getStaticProps - exposing top-level identifiers.
  6. recma-nextjs-static-props
    • This plugin is intended for use with Next.js and MDX. It injects a getStaticProps function which exposes all top level identifiers. This means these variable are available in pages/_app.js.

CAVEAT! I am new to the Node.js world and the Unified collective. Much of what I find seems to assume you are well steeped in the paradigm. This is unfortunate and it makes learning difficult - IMO.

Upvotes: 6

Related Questions