colyseus / colyseus.js

⚔ Colyseus Multiplayer SDK for JavaScript/TypeScript
https://docs.colyseus.io/getting-started/javascript-client/
MIT License
410 stars 107 forks source link

Public distribution file: emit header comment with version number #61

Closed endel closed 4 years ago

endel commented 4 years ago

Right now it's not possible to know which version of colyseus.js is being used if the file is grabbed manually from dist/ folder.

We should have a header stating its version number:

/* v0.11.7 */
...
seiyria commented 4 years ago

Could you also do a global.colyseus.version? That might be easier since you can import your package.json as part of the build process.

endel commented 4 years ago

Sounds better! 😅 Thanks @seiyria

endel commented 4 years ago

I'm going to close this for now as the header has been placed on the dist/colyseus.js file.

To ensure a Client.VERSION is also available we'd need to somehow modify the lib/* files generated by TypeScript, which are not post-processed by webpack so far, but as the version is already listed on package.json and package-lock.json I believe that's not much of a problem.