joshwcomeau / guppy

🐠A friendly application manager and task runner for React.js
ISC License
3.27k stars 154 forks source link

Export to Codesandbox #323

Open AWolf81 opened 5 years ago

AWolf81 commented 5 years ago

I've seen on JSUI an issue from @compuIves for exporting the local project to Codesandbox and I like the idea to have a way to easily share the current project with others.

I'm working on it. Nothing pushed yet but exporting is working but I need to refactor it. So everything is in a new saga.

Info: Codesandbox-cli can only export a CRA - so I've filtered Gatsby & Nextjs and hide the export section.

Todos:

Codesandbox token flow This is how I have it at the moment. Maybe needs to be improved.

  1. Trigger an export with codesandbox <projectPath>
  2. Automatically opens https://codesandbox.io/cli/login
  3. User copies that token into an input field in Guppy
  4. Trigger a new export with the token
  5. On success, it will display a button in the export section to open the sandbox in browser.
  6. On failure, it displays a message box about the error

Things to discuss