-
Notifications
You must be signed in to change notification settings - Fork 91
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
disentangle js files ("modules") #80
Comments
The only real dependency cycle exists between |
This would resolve the dependency cycle without further ado. In fact, everything that |
Maybe More importantly, is there a way to prevent this from re-emerging as an issue? Perhaps build flow into the build system (i.e. CircleCI)? |
Maybe we can enforce constraints on which modules may import certain other modules. |
How? I'd much rather just run Flow... then we get type errors reported as well. (since this task otherwise is literally just copy pasting code, this should get done as well). |
Why do only |
I guess those are the files I worked most on :) Or maybe the other files gave too many errors at the time. |
Yes, if it doesn't break anything (or if you fix what it breaks ;)) |
Spoiler: It breaks. |
(Flow removed weak mode so now we have to explicitly type a bunch of stuff for it to even start working...) |
* Add file download workaround for Safari (fixes #97) * Changed Download_Browser_Warning * Added workaround for Safari Fixed translator.js Fixed wierd bugs that I have no idea how I had made. * Moved .fadeIn out of conditional block * Added comments to increase code readability * Allow right-click to download even if workaraound is used * Revert string changes * Fix multiple download in Safari >10 Fix es-lint Fix es-lint * Removed Download_Browser_Warning * Change way we check for Safari version Instead of looking at specific version (10, 11) look for one digit version (9, 8 and earlier) * Remove unused global varaibles * Extended comment about Safari workaround * Run cleanup * Fixes #201 (Chrome audit improvements) * Improved Chrome audit performance * Update Makefile * Fixed formatting errors * Fixed more formatting errors * Revised "start_url" * Removed sw.js * Removed script for registering service worker * Revised makefile, manifest.json, and index.html * Improved Chrome audit performance further * Improved audit performance further * Fixed errors * fixed houndci error * Fixed final errors * Added whitespace * Fix <html> localisation * Disentangle JS modules and fix Flow (fixes #80) * [WIP] Disentangle JS modules (#225) * Disentangle JS modules * Fix imports * Use flow on individual files * Declare modules to Flow * Run Flow directly * Cleanup * Fix some import/export issues * Make the build work * Tweak flow decl * Move around the config decl to make build work * Delete extra line * Fix make debug (fixes #220) * Improvements to Flow coverage * Better flow coverage * Doesn't look like the stubs actually belong to jQuery 3 so I'm reverting these changes * Remove unnecessary var * This name makes a lot more sense * Remove unnecessary type annotations (clutter code & are obvious e.g. string literals) * More unnecessary type annotations * Remove more unnecessary annotations * Prefer literal union type * Add a type and remove one * More fixes * Fix persist choices * Remove more redundant annotations * Remove more unnecessary annotations * Switch to Array<...> shortform * Undo one of my 'fixes' * Final flow fix * Convert Object to {} shorthand * Remove a couple more unnecessary annotations * Some final cleanup * Implement requested changes * Add/Remove/Fix types * Adapt config types * Un-Flow strict.js * Allow subtitle to be null * Final tweaks * Simplify progress bar update * Split CSS into multiple files and improve organization (fixes #212) * Split CSS into multiple files * Better organization * Minor tweaks * Bring all the coverage over 90% * Fix buggy UI with detect-language (fixes #236) * Refactor repeated code into a function * Fix the locale selector I probably broke * Show translation not available less often * Remove a warn that gets triggered all the time * More generic port configuration with Docker * Less awkward input label placement * Slightly more sane language sorting with variants * Significantly more sane translation language column computation * Fix typo * Store docker pair data in persistent volume and add update all script * Include language modules download in deploy script (fixes #244) * Minify JS and CSS (towards #130) * Minify all.js and all.css * Make minification fail gracefully * Update README section on compression * Use command line interfaces * Update Dockerfile * Update README.md * Update README.md * Fix dockerfiles * Fix debug HTML * Fetch monolingual modules before pairs in deploy-all script * Merge handleTranslateSuccessResponse * Update imports/exports * Add JQuery modal/tooltip stubs * Add config.SUGGESTIONS stubs * Fix remaining Flow issues
Currently, there's a lot of interdependency in the js files, e.g. localisation depends on stuff from util that depends on stuff from localisation. It'd be nice if the dependencies were hierarchical (no cycles), to make it possible to use e.g. http://flowtype.org/ on the individual files instead of just on the concatenation of the whole project :)
The text was updated successfully, but these errors were encountered: