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
Migration from CoffeeScript #1197
Comments
I’m in favor, but I’m not sure how necessary this is. |
A pull request is welcome!
This. So far, only 4 commits to the app code originate from non-members: https://github.com/freeCodeCamp/devdocs/commits/master/assets/javascripts/app |
Would TypeScript actually bring a real added value (higher pros than cons) over JavaScript? What was the initial motivation of using CoffeeScript over JavaScript and would it make sense to use TypeScript to cover the same requirements, instead of pure JavaScript or the current CoffeeScript? I'm honestly giving feedback based on an experience in a team collaborating directly with the Angular team, working around Angular for promotion/support/development inside a 10K people company: TypeScript sometimes (often maybe) brings more struggles to us than it solves. We are experts in UI web frameworks, it's not that we don't know how to use it. The maintenance and community are important criteria to make a choice, but clearly not the main ones. Motivation should arise from a "personal" (to the project) requirement, something technical or things like comfort in coding for instance. So if TypeScript would actually brings something valuable, and not be just chosen because it's more hyped and widely used (otherwise why not switch to Angular too? Spoiler alert: we're trying to move away from it because it's heavy and over complex while simpler, more logical alternatives exist). I'm just bringing feedback though I'm not contributing to the project, just following it. It will never be doomed if you choose TypeScript, but it might not be a good thing either, just make a more considered choice. |
Sorry, but I didn't say it was just a hype. I said it is sometimes adopted just because it is popular, which is an important difference. Regarding your points:
TypeScript also brings a potentially slow compilation step (though that's always relative) and a maintenance regarding tooling and its configuration. In the context of DevDocs though, the "negative" points might not be that important. Once again I just wanted to share my experience to make sure it's not "switching just to switch because other switched". For some projects, we went by default with TypeScript because we were used to do that in other projects, and we regretted, since making highly flexible APIs became a nightmare (or we would use |
Also, I don't favor TypeScript particularly, but migration of Devdocs from CoffeeScript is better. My point is migration from CofeeScript, even if it's to just plain JavaScript |
Ah yeah I didn't ask why CoffeeScript was an actual issue? I'm curious about the actual, rational motivations (myself I'm using LiveScript in personal projects) The main points I see are:
|
Sorry for confusing everyone about typescript, i just added as a suggestion, migration from coffee to javascript itself helps new contributors and mainatainers alike |
I was not referring to TypeScript in particular in my latest question (it's not because I used it as an example of learning curve that it means that it was the main topic), I was focusing on why getting rid of CoffeeScript would help contributors and maintainers (with properly explained arguments) |
People wanting to work on this task might want to try the following tool: https://decaffeinate-project.org/repl/ |
Can I work on this task ? |
Someone already tried to do this a few years ago: rockon999/devdocs-es6 and the relevant Gitter conversation. As for my 2 cents (I'm one of the people who has done extensive work on the CoffeeScript code): while I also prefer TypeScript over JavaScript over CoffeeScript, this issue would take quite a lot of time. I would certainly not label it as a good first issue, because:
I do however agree that moving away from CoffeeScript to something more mainstream may cause more new contributors to contribute to the project. |
I'm still around and interested in this - if I recall correctly the major blockers were the build pipeline being quite challenging to update as it was a semi-custom mix of components from the Rails-adjacent stack that were not receiving a lot of community support at the time (and this was ~2 years ago) |
In terms of not doing this in one gigantic de-coffee like I prototyped I think the following needs to happen:
As a workflow for converting CoffeeScript to TypeScript:
The big hurdles are going to be the custom object-based imports and stripping out the Sprockets-dependent code. |
You could, theoretically, do a massive decaffeinate eventually... But I think getting the import system and build system issues resolved first would make it significantly easier and less prone to breakage. |
It's been a while, is this still relevant / wanted? I could start working on it if Typescript or pure Javascript is decided. Or event the build, we could use something easier like vite to build the whole thing if possible. Thanks! |
Yes. I'd prefer vanilla JavaScript over other languages that require an additional build step. My PR (which is linked above) is half-finished, but is somewhat stalled for the remaining |
No description provided.
The text was updated successfully, but these errors were encountered: