-
-
Notifications
You must be signed in to change notification settings - Fork 833
chore: add npm + vite for progressive enhancement #1261
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
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for afmg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Don't be afraid. it's mostly files moved 😆 |
|
Just throwing this in here: Is there a reason for choosing npm in particular? |
|
Nope, just took what I think most of the web frontend community is comfortable with. Feel free to propose alternatives |
The previous/still open vite branch used yarn. I personally like bun. Though deno is out there too and I got it as recommendation from a friend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces npm and Vite as a progressive modernization step for the Fantasy Map Generator. Rather than attempting a complete rewrite, it establishes a build toolchain that can incrementally transform the codebase while maintaining backward compatibility.
Changes:
- Adds npm package management with Vite as a development dependency
- Introduces build, dev, and preview scripts for local development and production builds
- Updates deployment configurations (Netlify and Docker) to use the new build process
- Removes legacy Python and PHP server scripts in favor of npm-based development workflow
Reviewed changes
Copilot reviewed 6 out of 691 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Defines npm package configuration with Vite scripts and project metadata |
| netlify.toml | Configures Netlify to use npm build process with Node 24 environment |
| Dockerfile | Implements multi-stage Docker build using Node builder and nginx production server |
| run_python_server.sh | Removes legacy Python development server script |
| run_python_server.bat | Removes legacy Python development server script for Windows |
| run_php_server.bat | Removes legacy PHP development server script for Windows |
|
Bun is faster, but it doesn't mean any real improvement as we don't have any significant amount of dependencies or build steps. |
Co-authored-by: Copilot <[email protected]>
|
@Azgaar just out of curiosity before I invest too much more time: Is this something you consider? I am already reworking first Typescript parts if so 🙂 |
|
Yes, but the change should be tested and provide some benefit on its own. |
|
Okay, I am currently migrating utils to TS. Will then add another PR dependend on this one for you to check 🙂 |
Description
There were several attempts to rebuild/update/improve the codebase with modern technologies (including by a young naive me years ago ;D). In my experience these are always doomed to fail when trying one big jump. That's why I would not introduce all the fancy things (TS, bundling, modules, etc) at once but move progressively.
So I propose this change to add npm to allow simple adding/migrating of libs, adding scripts, simpler versioning, etc. as well as vite as build tool with "just" copying files over as is for now.
Type of change
Versioning