-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Reconsider :common set #1119
Comments
I'm on second varian. But it looks we need to increase major version to change this set? |
Please introduce a new major version and create standalone definitions for almost all languages. 📦 🎉 |
Versions changing is cheap, it's a technicality :-) @derhuerst we already have all the languages available separately on CDNs at |
Yes, but to have them as standalone CommonJS-compatible NPM modules. (; |
@derhuerst the NPM build already includes all the languages, there's no point in packaging them individually. |
There is, for example in reducing the bundle size when using browserify, which seems to be the standard frontend workflow nowadays. It would also help keeping major version bump down to a minimum in the core. Moving the core detection into a separate module would also be nice, as many non-browser tools could directly use it (see #1086). |
Let's keep the discussion in this issue related to the topic. We're not discussing packaging in general, we're discussing the :common set for browsers. As for packaging, we're currently holding to a policy where we don't cater to any currently trending way of bundling but rather provide a build tool which can be used to package highlight.js in any way imaginable. We may reconsider this in the future, though. |
@isagalaev I think your proposal is good: it's not based on personal preferences, instead it takes into account what users look for — therefore "common" refers to what is commonly expected. But I would like to expand on the issue of keywords filtering:
|
The latter.
I'm not aware of anyone actually needing it. There are essentially just three ways the build tool is ever used:
|
@isagalaev Could we get some fresh download stats to reconsider this issue in 2019? If you have time. |
I vote both. I don't see the harm in having "small" and "medium" builds (so 40kb and 200kb, let the user decide). I just have no idea where in the codebase I could go right now to change this, or if this is hidden away on some build server somewhere. |
Perhaps @marcoscaceres knows? |
I think we both decided only @isagalaev knows. |
@yyyc514 @egor-rogov I get the stat by parsing logs on highlightjs.org, it's not anywhere in the code base. Current stats:
This is, however, not a very good source of truth anyways for two reasons: it's biased (heavily) towards currently pre-selected However, this entire idea may not be worth tackling by itself in light of #1759. P.S. I've been actually very much removed from highlight.js for quite some time now. I only noticed this discussion by pure accident among another 100+ new emails I suddenly got in my inbox :-) |
@isagalaev The question is where is this :common list and how do we update it? IE, the list you've always used to build this "canonical 40kb file"... We're not going to come up with a new build system overnight but it would be nice to update :common when we issue new releases until then. Or perhaps even to split common into |
Ah… This comes from metadata in language files, specifically Making more special categories would indeed require changes to the server. But I always felt it wasn't really a solution anyway. |
Well, that makes it harder for us to have TWO different builds I suppose but it's very helpful to know we can change it. :-) Thanks! |
@egor-rogov After reviewing this my votes for adding to common:
All sizes uncompressed... All seem pretty tight and compact... +41kb raw That's just off the top of my head. I don't really know about R, but it's pretty small... Most of the other stuff is pretty known to be hot right now and kind of popular. Swift, Rust, Go, Kotlin, SCSS, Less, Docker, Typescript, etc... The only thing that popped for possible demotion is CoffeeScript (4.1kb uncompressed), which has seen better days... |
Oh there is PowerShell, but it's pretty heavy at 35kb, making me dislike compared to the others. If size was no issue (or less of an issue)... ie for a "medium" build I'd just go and start picking everything I've heard of:
And that'd probably still be pretty small. |
Apache and Nginx seems a little obscure perhaps (as languages), but the sizes are pretty small. |
@egor-rogov Any issue on renaming a few? I was going to rename Not super important, just a thought. |
@yyyc514 I wouldn't break compatibility with no good reason. |
And by modern standards both those look tiny (just packed, not even gzipped) |
Closing this in favor fo the new issue: #2206 |
Cc: @Sannis, @sourrust
Hi guys,
I've had a few ideas about updating the :common set of languages to better match reality and expectations.
Here's the download stats from the site, by language:
The 500+ top are the current :common set (with "dts" being there by mistake, we've missed it during review).
I've got two alternative ideas:
What do you think?
The text was updated successfully, but these errors were encountered: