closure-compiler
replace-jquery
closure-compiler | replace-jquery | |
---|---|---|
15 | 9 | |
7,263 | 1,160 | |
0.4% | - | |
9.6 | 0.0 | |
2 days ago | over 2 years ago | |
Java | JavaScript | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
closure-compiler
-
Figma's Journey to TypeScript
Well, the nice thing with Python types is that the _only_ difference to untyped Python is the type annotations. Last time I worked with TypeScript (two and a half years ago), it felt more like a different language _similar_ to JS. In my experience it was quite... viral. With MyPy I've genuinely seen just specific parts of a code base become typed and didn't notice any friction.
I wonder what would happen if that proposal for type comments in JS went through. Would TypeScript become just a type checker / optimizing compiler?
Google's Closure had an (IMHO) nicer approach (https://github.com/google/closure-compiler/wiki/Types-in-the...), but I don't get the impression it'll ever catch on outside Google.
-
TypeScript Might Not Be Your God: Case Study of Migration from TS to JSDoc
The most well-known tools that rely on JSDoc are Closure Compiler (not to be confused with the Closure programming language) and TypeScript. Both of these tools can help make your JavaScript typed, but they approach it differently. Closure Compiler primarily focuses on enhancing your .js files by adding typing through JSDoc annotations (after all, they are just comments), while TypeScript is designed for .ts files, introducing its own well-known TypeScript constructs such as type, interface, enum, namespace, and so on.
-
Minify and Gzip (2022)
Closure Compiler follows the same line of thinking:
https://github.com/google/closure-compiler/wiki/FAQ#closure-...
- Svelte is migrating from TypeScript to JSDoc
-
Do any engines or optimizers product TS-specific performance gains?
I think only Google Closure Compiler did some optimizations based on its JSDoc-style annotations (see docs). If I remember correctly, types mostly allowed renaming objects' properties across modules, but most other advanced optimizations (like dead code elimination or functions inlining) didn't rely on types. In my experience properties renaming resulted in subtle, hard to discover bugs and I'd say they didn't bring much benefit.
- Can something like typescript or elm be AOT-compiled efficiently?
-
What does it mean?: *Template parameter* in Google style guide
The @template tag is supported by Google Closure Compiler
- Google announces a new OS written in Rust
-
Google Fonts Pull Requests Ignored
i'm not sure you want them to write back https://github.com/google/closure-compiler/pull/3958
time to fork
- Why don't we do this instead of TypeScript?
replace-jquery
-
jQuery to VanillaJs
This might be worth checking out: https://github.com/sachinchoolur/replace-jquery
- Auto-generate vanilla JS alternatives for jQuery methods
-
Show HN: Auto-generate vanilla JavaScript alternatives for jQuery methods
- It seems to have subtle bugs, like the way the events string is split makes so that double consecutive spaces in it (which can happen as a result of a typo) will result in listening to the empty string event. Basically: 'foo bar'.split ( ' ' ) => ['foo', '', 'bar'].
The `on` method we are using in Cash [1] is a lot more convoluted than that. On one hand it requires more bytes, but on the other the chances of it behaving exactly like jQuery's are much higher. In fact we can also run jQuery's test suite with Cash to spot issues.
Feel free to ping me if you are interested in joining forces.
[0]: https://github.com/fabiospampinato/cash
[1]: https://github.com/sachinchoolur/replace-jquery#on
[2]: https://github.com/fabiospampinato/cash/blob/master/src/even...
-
Hacker News top posts: Sep 6, 2021
Show HN: Auto-generate vanilla JavaScript alternatives for jQuery methods\ (0 comments)
- Automatically find jQuery methods from existing projects and generate vanilla js alternatives.
- Show HN: Auto generate vanilla JavaScript alternatives for jQuery methods
What are some alternatives?
swc - Rust-based platform for the Web
zepto - Zepto.js is a minimalist JavaScript library for modern browsers, with a jQuery-compatible API
terser - 🗜 JavaScript parser, mangler and compressor toolkit for ES6+
cash - An absurdly small jQuery alternative for modern browsers.
V8 - The official mirror of the V8 Git repository
homebrew-x - My homebrew packages
postgres - Unmodified Postgres with some useful plugins
awesome-actions - A curated list of awesome actions to use on GitHub
npm-groovy-lint - Lint, format and auto-fix your Groovy / Jenkinsfile / Gradle files using command line
tiny-events.js - TinyEvents is a tiny event utility library for modern browsers(IE 11+). Supports jQuery-like syntax. Just 1 kb gzipped.