Skip to content
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

Zero-build Joystick #356

Open
rglover opened this issue Oct 16, 2023 · 3 comments
Open

Zero-build Joystick #356

rglover opened this issue Oct 16, 2023 · 3 comments
Assignees
Labels
feature Something new to add @joystick.js/cli Related to the @joystick.js/cli package.
Projects

Comments

@rglover
Copy link
Contributor

rglover commented Oct 16, 2023

Starting to think about removing esbuild (or any build tool) from Joystick. We're hitting a point where modern JavaScript has enough universal support that a build tool isn't terribly necessary.

It'd be worth doing a feature branch where we rip out building and just replace it with some simple copying to .joystick/build and maybe do some minification. Ideally, Joystick v2 ships without a build tool entirely. Not only would that reduce the footprint dramatically but development changes would be instant.

The only real advantage right now is build plugins which we use to do the component IDs and mount injection. These are technically just regexes, though, so migrating that work out of a plugin should be pretty straightforward.

@rglover rglover added feature Something new to add @joystick.js/cli Related to the @joystick.js/cli package. labels Oct 16, 2023
@rglover rglover self-assigned this Oct 16, 2023
@rglover
Copy link
Contributor Author

rglover commented Oct 16, 2023

https://node.green/

@rglover
Copy link
Contributor Author

rglover commented Oct 16, 2023

This is even more interesting because it brings Joystick even closer to being a "standards based" approach to full-stack dev. No hacks/abstractions/etc., just raw web dev in an easy-to-consume package.

@rglover
Copy link
Contributor Author

rglover commented Oct 17, 2023

A quick test shows this is pretty straightforward. Only hang up will be Joystick UI where we'll need to polyfill the window in Node for SSR. One way to do that is to make it so we can "init" joystick.js/ui, passing a window object. So, instead of expecting an actual global window, pass a root object that could be window, process, global, or just a random object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Something new to add @joystick.js/cli Related to the @joystick.js/cli package.
Projects
2.0.0
Awaiting triage
Development

No branches or pull requests

1 participant