Skip to content

Instantly share code, notes, and snippets.

@montogeek
Created August 20, 2018 20:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save montogeek/0a600e1c63a58d9ef2b8395e4aea3773 to your computer and use it in GitHub Desktop.
Save montogeek/0a600e1c63a58d9ef2b8395e4aea3773 to your computer and use it in GitHub Desktop.
<pre>
<code>
module.exports = {
<ul> /* This would be rendered by the React component */
<li clas="default">production</>
<li>development</li>
<li>none</li>
</ul>
}
</code>
</pre>
module.exports = {
  mode: "production" <marker modes>
}
// Pseudocode
import Modes from 'modes' // React component which would display a dropdown or whatever
// This could be a dictionary like: `{ "marker": <ReactComponent /> }`
const tree = // Markdown tree, actually an array
const modePosition = findModeMarker(tree)
tree[modePosition] = <Modes />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment