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
Fix package size by excluding docs #5643
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These files are used to generate website :)
And what's the issue exactly? Why do they need to be in the npm package? They are still in the repo. If they are being used somewhere else as input for the website, then we should change how the website is built. The docs don't need to be in the npm package for the majority of the package consumers, I don't see why we need them to pay the "penalty" whatever that is. |
I see only one issue. This PR should not be merged until our website relies on these files. |
Now, And, I agree with @XhmikosR. 👍🏼 # too many docs changes... 😓
npm diff --diff stylelint@13.13.1 --diff=stylelint@14.0.0 |
I think the idea of using Stylelint from npm is to have website to show docs for that latest released Stylelint version. E. g. if using repository as source of docs, website many times would provide info about unreleased options, rules, etc. We could use Git tags (instead of |
You can still limit what's used through git tags or similar.
There's literally no reason to include the files to the package.
…On Sun, Oct 24, 2021, 21:38 Aleks Hudochenkov ***@***.***> wrote:
I think the idea of using Stylelint from npm is to have website to show
docs for that latest released Stylelint version. E. g. if using repository
as source of docs, website many times would provide info about unreleased
options, rules, etc.
We could use Git tags (instead of main branch) to get docs to website
from this repository.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#5643 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACVLNOOUXNGUZRKVWV7ZALUIRHBFANCNFSM5GR44L7A>
.
|
@XhmikosR I'm in favor of removing docs from the package. I want to be sure we figure out how website will get content. And stick to it, before we remove docs from the package. |
Hotfix to make the images on the homepage work after renaming
It seems that the
I agree. We included the docs in the package originally, because it was the simplest way. What's the best, and ideally still simple, way to make all the markdown files available to the website (and be able to fix it to a specific version)? |
How about installing a tarball like this? {
"dependencies": {
"stylelint": "https://github.com/stylelint/stylelint/tarball/14.0.0"
}
} |
Tarball seems a good solution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 👍🏼
I pushed another patch which, in my eyes, is cleaner, but we can go with either way. The result is still the same:
EDIT: I had to revert it because ESLint wrongfully complained. |
Before: total files: 572 package size: 260.0 kB unpacked size: 1.4 MB After: total files: 356 package size: 149.1 kB unpacked size: 780.9 kB
00d98c8
to
cb9444f
Compare
This reverts commit cb9444f.
|
Before:
total files: 572
package size: 260.0 kB
unpacked size: 1.4 MB
After:
total files: 356
package size: 149.1 kB
unpacked size: 780.9 kB
Basically, got rid of all docs and rules README.md files. Now, I know that it might have been intentional, but it makes a big difference. Also, I checked eslint and they don't include the docs either. After all, all this info is available in the repo and the website.
IMHO, at the end of the day, it's probably a good change that will help with the package size and/or install time.