-
-
Notifications
You must be signed in to change notification settings - Fork 681
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
Modern JavaScript practices and tooling #402
Comments
Hi @sberney, Thanks for the suggestion! I'm ok with new ways of working, just not sure it can be done that easily. We have a lot of code and refactoring will take some time, while I cannot work actively these days. I don't think moving to webpack will make the tool significantly better, it will be easier to support, but still that's a lot of work and changing the paradigm at this point of time is a big change. It may be a better idea to start with something small and doable in 1-2 days. |
I agree that restructuring is a big project, but it's a lot easier if you have the tooling in place. I know exactly what you're saying. Here's one process that puts off some of the more gnarly decisions:
I did a little bit this evening to get the linter working. A lot of it is just silly book-keeping, writing down which variables and functions are currently globally available, and where to find them. In the future, the list would slowly dwindle until there aren't very many global methods. The linter can resolve ES6 style imports to make sure they work. Anyway, the linter would eventually be part of a webpack build/watch process, or another bundler. Ideally, a build process goes something like: 1. install, 2. lint, 3. build, 4. test. Thanks for working on this tool, it's really cool. I'll play around with it some more. |
Hello. Yes, it can be useful, but still requires a lot of time to move to a new version. Not sure I have this time as I was not able to work on Generator since Christmas. |
@sberney If you're going to do a refactor, consider adding TypeScript, too. It'll make it much easier for new devs to jump in and do work because they'll immediately be able to see what every object looks like without digging through the extensive amount of code that's in the project. |
Closing as for now, PRs are welcomed. |
Are you at all interested in me adding a build with
npm
oryarn
to install 3rd party dependencies, modifying your modules to ES6 syntax by adding babel, adding a rollup (or possibly webpack) based build to produce an optimized output (it might be fun to try out the google closure compiler too with either), and we can write a short script to generate those electron files?I can also hook up lint, and can add flow typing if you like. I don't know what you know about lint, but it helps you find errors and simultaneously maintain stylistic conventions. The trick is configuring it to your stylistic convention, and mine is very much different than yours. Still, it can provide a lot of non-stylistic features.
It would be pretty straight forward for me to do this kind of stuff, but it would change your workflow by adding a build step. You would need node.js (and the bundled npm), and have to run
npm watch
to get the build to watch your file.Are you interested in adding some tooling like this?
The text was updated successfully, but these errors were encountered: