Skip to content
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

Use TypeScript in Freeciv-web #279

Closed
andreasrosdal opened this issue Apr 4, 2019 · 1 comment
Closed

Use TypeScript in Freeciv-web #279

andreasrosdal opened this issue Apr 4, 2019 · 1 comment
Labels
enhancement Freeciv-web The Freeciv-web Java webapp module Help-wanted!

Comments

@andreasrosdal
Copy link
Contributor

andreasrosdal commented Apr 4, 2019

Consider using TypeScript in Freeciv-web JavaScript client.
https://www.typescriptlang.org/

  1. Modify generate_js_hand.py to generate TypeScript class definitions:
    https://github.com/freeciv/freeciv-web/blob/develop/scripts/generate_js_hand/generate_js_hand.py

  2. Use class definitions in JavaScript code, for example objects of Units, Cities, Techs.

  3. Update build system to compile the TypeScript, for example TypeScript Maven Plugin:
    https://github.com/ppedregal/typescript-maven-plugin
    Or use an node.js based solution.

https://stackoverflow.com/questions/15363246/how-to-use-coffeescript-together-with-google-closure

Help wanted with this.

@andreasrosdal andreasrosdal added enhancement Freeciv-web The Freeciv-web Java webapp module Help-wanted! labels Apr 4, 2019
@mchenryc
Copy link
Contributor

mchenryc commented Apr 6, 2019

In response to the final link: Please ignore coffeescript, in favor of typescript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Freeciv-web The Freeciv-web Java webapp module Help-wanted!
Development

No branches or pull requests

2 participants