-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
A way to customize the default "src" #23
Comments
After opening this issue I discovered #7, and I find the reasoning in there strange, because what is more common is not necessarily better. Even "source" instead of "src" would be better in my opinion, but whatever. As I said, this shouldn't really be the point of the issue, as there should just be a way to customize the app folder name. |
@nnmrts Thanks, we did go back and forth between what a default directory should be, but I agree that making it customisable would be nice. I think due to needing a bit of config for either the oak server, or vercel/deno deployments, the project code would be easier managed living in a specific directory for the time being. |
This should be fully resolved in v0.7.0. You can update the default 'src' directory to a custom directory by making the following changes... server.ts Pass through a custom await ultra({
importmap,
dir: "example"
}); importmap.json Update your main app import location... {
"imports": {
"app": "./example/app.jsx"
}
} I want to push back on having source files in the project root, as many projects require CI, testing, config, that should live at root level. |
So firstly, as a sidenote, I think the default cwd (where ultra looks for the app.jsx/app.tsx file) shouldn't even be "src" because the whole philosophy around ultra is that there is no "source", no "build", no transpiling stuf. It should just be called "website" or "root" or "public" in my opinion, or even better, it should just be the current directory the server file is in.
Secondly, and more important, I suggest that this should be customizable. I know, ultra seems to be one of those "zero-config" projects, and I really love that it is, but I believe that the cwd is such a fundamental part that there should just be a simple "cwd" or "root" setting when calling
ultra
, like so:If you (as in you, the maintainers of ultra) agree, I'll gladly add a pull request for this. I assume it wouldn't be that difficult to introduce this setting, but let's see.
The text was updated successfully, but these errors were encountered: