Skip to content

Conversation

@SheepFromHeaven
Copy link

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

  • Bug fix
  • New feature
  • Refactoring / style
  • Documentation update / chore
  • Other (please describe)

Versioning

  • Version is updated
  • Changed files hash is updated

@netlify
Copy link

netlify bot commented Jan 11, 2026

Deploy Preview for afmg ready!

Name Link
🔨 Latest commit 76f8649
🔍 Latest deploy log https://app.netlify.com/projects/afmg/deploys/696630e90f17e30008d65591
😎 Deploy Preview https://deploy-preview-1261--afmg.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@SheepFromHeaven
Copy link
Author

Don't be afraid. it's mostly files moved 😆

@StempunkDev
Copy link
Contributor

Just throwing this in here: Is there a reason for choosing npm in particular?

@SheepFromHeaven
Copy link
Author

Nope, just took what I think most of the web frontend community is comfortable with. Feel free to propose alternatives

@StempunkDev
Copy link
Contributor

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.

@Azgaar Azgaar requested a review from Copilot January 12, 2026 11:25
Copy link

Copilot AI left a 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

@Azgaar
Copy link
Owner

Azgaar commented Jan 12, 2026

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]>
@SheepFromHeaven
Copy link
Author

@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 🙂

@Azgaar
Copy link
Owner

Azgaar commented Jan 12, 2026

Yes, but the change should be tested and provide some benefit on its own.

@SheepFromHeaven
Copy link
Author

Okay, I am currently migrating utils to TS. Will then add another PR dependend on this one for you to check 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants