elboman / gatsby-remark-embedded-codesandbox

A Gatsby Remark plugin for embedding Codesandbox given a folder of files
MIT License
32 stars 8 forks source link

fix(getFilesList) recursively search for files to include #6

Open mattrosno opened 5 years ago

mattrosno commented 5 years ago

Before, this plugin only worked with flat project directories, e.g.

examples
├── hello-world-example
│   ├── package.json
│   ├── index.html
│   └── index.js

Now, it works with subdirectories in projects, e.g.

examples
├── hello-world-example
│   ├── package.json
│   ├── public
│   │   └── index.html
│   ├── src
│   │   ├── index.js
│   │   └── styles.css

Did this to get a React app to work.

mattrosno commented 5 years ago

Hi @elboman, have you had a chance to check out this fix? Please let me know if you have any questions. Thanks!

karlhorky commented 5 years ago

@elboman would you be open to reviewing and merging this? It looks like a very useful feature to have.

karlhorky commented 5 years ago

@mattrosno I guess your fork is available now (as per https://github.com/carbon-design-system/carbon-website/pull/1074) and in order to use it in the meantime, users just need to edit their package.json as follows, is that correct?

-    "gatsby-remark-embedded-codesandbox": "^1.2.0",
+    "gatsby-remark-embedded-codesandbox": "github:mattrosno/gatsby-remark-embedded-codesandbox#release",
elboman commented 5 years ago

Looks good in general, I think we can make getFiles return the array instead of mutating the argument. I can suggest a few changes later in the day!

karlhorky commented 5 years ago

Friendly ping @elboman :)

karlhorky commented 4 years ago

Hey @elboman, just circling back around to this one now.

Could you suggest those changes so this can be merged?

mAAdhaTTah commented 4 years ago

This would be really help for a project I'm working on. @mattrosno Are you still working on this?

mattrosno commented 4 years ago

@elboman thanks for the review! I'm not able to make these changes right now. Feel free to close if you want to do this in a separate PR, or if @mAAdhaTTah wants to see this through - all you!

karlhorky commented 4 years ago

@mattrosno probably still no bandwidth to work on these changes, right?

And I guess @mAAdhaTTah, I suppose you're not able to take over here.

@elboman Maybe time to try to find someone to bring this home.

mAAdhaTTah commented 4 years ago

@karlhorky Yeah, I ended up just working around it by flattening my directory structure.

karlhorky commented 4 years ago

Looks like this remark plugin allows for an arbitrarily deep directory structure, switching to this one:

https://github.com/kevin940726/remark-codesandbox

karlhorky commented 3 years ago

@elboman for those who still want to use this plugin, would you consider merging this one?

guyathomas commented 3 years ago

Hey guys, forked this plugin and made it recursive if anyone else wants it https://www.npmjs.com/package/@guyathomas/gatsby-remark-embedded-codesandbox

karlhorky commented 3 years ago

Thanks @guyathomas !! I guess this is the repo: https://github.com/guyathomas/gatsby-remark-embedded-codesandbox

Are you planning on providing some simple support over there? If so, maybe you could open up the Issues tab?

Or - maybe even better - @elboman could give you maintainer rights here...

guyathomas commented 3 years ago

Hi! Yeah, that's the repo! Yeah, a word of caution I don't plan on officially maintaining that going forward - ideally, the changes would be merged into this repo - I have this open PR. https://github.com/elboman/gatsby-remark-embedded-codesandbox/pull/27

if @elboman is willing to do that, I'd happily maintain / support it from here :)

karlhorky commented 3 years ago

Right yeah, it would be great to get an active maintainer here!

@elboman what do you think of adding Guy as a maintainer?