denali-js / cli

The official CLI for starting, building, and running Denali apps and addons
MIT License
5 stars 5 forks source link

Skip rebuilds if nothing has changed #39

Open davewasmer opened 6 years ago

davewasmer commented 6 years ago

There might be many instances where the developer runs denali server with nothing changed from the last build. It would be ideal if we could simply skip the build step and re-use the already compiled dist.

We could hash the source directories (do we include node_modules and/or addons?) at build time, and write that hash to dist/.build (filename TBD). Then when we go to rebuild, we rehash the source directories and compare to dist/.build. If they are the same, we are okay to re-use the built output.

This might also be helpful when we get around to implementing a denali server --production that works on prebuilt files

seawatts commented 6 years ago

This sounds amazing!