monofuel / badmars

html5 multiplayer rts game
https://japura.net/badmars
Other
4 stars 1 forks source link

Fix file watching for new dev layout #28

Closed monofuel closed 7 years ago

monofuel commented 7 years ago

Previously, badmars used babel-watch to watch for changes. Because i want to get typescript into the mix, the project is transpiled with babel into ./bin/server/nodejs. The problem with babel --watch is that it does a full rebuild, and then watches for file changes, however I want it to only watch for changes since the project should already be built.

I started a script buildWatch.sh that can be ran in a container via make dockerWatch which should watch for file changes, but it's having some issues (multiple events are fired, specifying -e modify doesn't seem to generate events, %w%f doesn't seem to ever specify filename, i'm probably doing stupid mistakes)

The end flow that i want a make target to build all the containers (docker-compose build) and build the project (dockerBuild) and then another make target to run the server with server code hot reloading.

monofuel commented 7 years ago

nevermind, using browserify with --node --im to build and hot reload babel + typescript backend services work quite great.