FormidableLabs / spectacle

A React-based library for creating sleek presentations using JSX syntax that gives you the ability to live demo your code.
https://commerce.nearform.com/open-source/spectacle/
MIT License
9.77k stars 693 forks source link

Chore/spectacle mdx loader addition #1228

Closed paulmarsicloud closed 1 year ago

paulmarsicloud commented 2 years ago

Description

First pass and attempt at bringing in spectacle-mdx-loader into the monorepo. Took onboard @ryan-roemer's advice to remove all devDeps and scripts and focus on getting lint and prettier working as a start. Moved prop-types and spectacle-mdx-loader into top-level package.json so that spectacle-mdx-loader could be called directly from examples/mdx/webpack.config.js.

In a good spot now for a second pair of eyes to take a look through 👍

Fixes #1164

Type of Change

How Has This Been Tested?

Checklist: (Feel free to delete this section upon completion)

ryan-roemer commented 2 years ago

@paulmarsicloud I've finished my cleanup of examples configs and dependencies. Mind double checking my commits?

@carlos-kelly @gksander @fritz-c I've noticed a discrepancy in code blocks in MD vs. MDX.

For our MD example with pnpm start:md for the code page we have:

Screen Shot 2022-09-21 at 1 50 03 PM

For our MDX example with pnpm start:mdx for the code page with exact same sample we have:

Screen Shot 2022-09-21 at 1 50 08 PM

Any ideas here? Thanks!

ryan-roemer commented 2 years ago

Offhand, now that I'm looking at things looks like our Markdown component does a lot more than mdxComponentMap does alone -- and we recommend in our guide to just use the mdxComponentMap for MDX decks.

ryan-roemer commented 2 years ago

Per slack discussion, we're not blocking on this and I've filed https://github.com/FormidableLabs/spectacle/issues/1232 to capture.

paulmarsicloud commented 2 years ago

@paulmarsicloud I've finished my cleanup of examples configs and dependencies. Mind double checking my commits?

Commits look good and works proper on my end!

ryan-roemer commented 2 years ago

@paulmarsicloud We're missing a build task for examples/mdx which I'm going to add (and to CI)

ryan-roemer commented 2 years ago

I've added the build task. I think we're otherwise ready for this PR with all the rest of the follow-on work ticketed.