-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set initial opened file, skip deps install & do not run start scripts as options in sandbox.config.json #514
Comments
Hmm, interesting. We have a list of entry points we traverse specific per template. The package.json entry is the first one we try. Do you have a link to the sandbox? I could definitely add an override based on sandbox.config.json! |
An override would be great! This sandbox loads fine as I've got an empty file I have noticed that it recognises this as the This sandbox fails to load as there is no Sorry I can't be of more help and PR a fix myself. You've innovated so much it's beyond me where to even start a solution. |
Okay! So if I understand correctly, you want to show https://github.com/jthegedus/blog-examples/blob/master/firebase-functions-es6-babel/src/functions/index.js from the https://github.com/jthegedus/blog-examples/blob/master/firebase-functions-es6-babel repo, without setting |
That's correct. I want to add the project to CodeSandbox without the I understand that it is common practice to use The discussion here firebase/firebase-tools#662 covers how the |
I am encountering the same problem. In my cases,i just want to clone a repo to show in CodeSandBox,and have some editting,that's it. But it seems not support yet. |
It would be great if CodeSandbox scanned the |
https://codesandbox.io/s/react-ts uses the same workaround. Related codesandbox issue: codesandbox/codesandbox-client#514
Spent a good chunk of time trying to hunt down where exactly in the code CSB is reading the I'm commenting to add another use case for having such an override. I'm trying to write a component library and I need to use the |
@Saeris mui-org/material-ui uses a dedicated I think this approach better suited for your use case. |
* [docs] add additional information for ts users to issue template * [docs] fix "Could not find entry" in typescript codesandbox https://codesandbox.io/s/react-ts uses the same workaround. Related codesandbox issue: codesandbox/codesandbox-client#514 * [docs] fix conflicting types issue for local development of examples Typescript pulls types from parent directories (which means types used in core). This currently leads to a ts error along the line of "cannot simultaneously extends types X and Y". See also microsoft/TypeScript#11363 * Typescript -> TypeScript
Oh I'm sorry for that @Saeris, the code to support the sandbox.config.js can be found here: https://github.com/CompuIves/codesandbox-client/blob/private-github/packages/common/templates/template.js#L74-L83 |
The material-ui method is not quite the same as it is using a pre-existing template. It somehow infers that I am using the What would be ideal is if For reference, this is the example I wanted: https://codesandbox.io/s/github/jthegedus/firebase-gcp-examples/tree/master/firebase-functions-es6-babel |
Also related: #1254 (that was however solved by adding the Aurelia template). |
Has this been added? I can't find any note of it in the docs. Would be great if one could simply add an Scott |
This would be really useful to me. I keep running into this issue where I write code to demonstrate something, but I do so in a separate file to the main entry point since the entry point has distracting boilerplate code. When I give the link or open my own sandbox, it opens on the boilerplate code and it's confusing what I'm trying to demonstrate. I would like to see the relevant file with the demo when opening the sandbox, not the boilerplate. |
Would love to be able to specify default file opened! +1 |
This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made. |
I suppose now a single opened file can be specified by the https://codesandbox.io/s/prismjs-forked-wu91d?file=/src/index.js |
@karlhorky It does work as you describe, this being my initial example - https://codesandbox.io/s/github/jthegedus/firebase-gcp-examples/tree/master/functions-express?file=/package.json However, the sandbox still installs all deps, and attempts to run code in While the title of the Issue is addressed, I had other requests in the body of the initial issue. |
That makes sense, can you please update the title of the issue so it's easier for us to scan through issues? |
I have a sandbox for a docusaurus template. I had to create a sandbox.config.json file to run yarn start but code sandbox still runs yarn serve instead of the defined yarn start. |
@sammychinedu2ky could you please check codesandbox/codesandbox-templates#134 (comment) |
thanks man I created a dev script and it worked. |
This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed. |
I guess not stale |
Can you remove the stale bot? Marking an issue as stale doesn't fix it. Either close the issue because you don't care about it, or leave it open until it's fixed, but don't let a bot determine this please. |
I added a label that will make it not close but tbh if it wasn't for the stale bot this issue would have probably never surfaced again, so I do think it's useful, it is kinda annoying but it has brought many issues back to the surface that would in any other way just stay buried in a time where we had about 600 issues |
This is my bad as this was a kitchen sink type of issue. I should have made 3 distinct issues so each could be closed instead of this lingering mess. I didn't consider the reach over the config this request would have on initial write. Though I've been inactive on this issue I continue to not be able to use codesandbox as I would like (synced blog examples). It's hard to gauge how many people are in the same position and don't find or thumbs this issue, perhaps it's a small group 🤔 I've updated the intial request with a checklist of the 4 changes I was actually requesting. We're in your house, so if you would like each remaining requests as distinct issues just let me know :) Thanks for your work 🙏 |
This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed. |
not stale |
This issue has automatically been marked stale because there has been no activity in a while. Please leave a comment if the issue has not been resolved, or if it is not stale for any other reason. After 2 weeks, this issue will automatically be closed, unless a comment is made or the stale label is removed. |
Not stale |
Is there a way that the settings inference could be done without the
main
field in thepackage.json
. This requirement is blocking me, as specifying amain
field will conflict with other tools I use, messing up their configuration (firebase/firebase-tools#662).With an empty
main
field my other tooling works as expected, but then I receive this error:Since other templates require specific dependencies, could it check if those templates apply first, then upon failing, infer that the repo being cloned is just an arbitrary folder structure?
As discussed here #43 and https://codeburst.io/github-medium-with-embedly-30d9115af585, I don't wish to execute the code from the repo in CodeSandbox, but merely use it as a way to keep blog code snippets in sync across my Medium blog (using gists for snippets in Medium is unmanagable).
Feat requests resolved
package.json
depspackage.json
main
field inpackage.json
as it conflicts with other toolsThe text was updated successfully, but these errors were encountered: