Skip to content
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

Reduce install size #3248

Closed
jeddy3 opened this issue Apr 1, 2018 · 4 comments
Closed

Reduce install size #3248

jeddy3 opened this issue Apr 1, 2018 · 4 comments
Labels
status: needs discussion triage needs further discussion type: enhancement a new feature that isn't related to rules

Comments

@jeddy3
Copy link
Member

jeddy3 commented Apr 1, 2018

Ref: #3236

The size of the install has increased significantly (and the number of packages has nearly doubled) between 8.4.0 and 9.2.0. I believe partly because postcss-html bundles a couple of parsers:

Difference between 8.4.0 and 9.2.0:

+ stylelint@8.4.0
added 260 packages in 12.919s
jeddy3:stylelint-test jeddy3$ du -sh node_modules
 24M    node_modules
+ stylelint@9.2.0
added 418 packages in 22.232s
jeddy3:stylelint-test jeddy3$ du -sh node_modules
 33M    node_modules

For comparsion, here's ESLint:

+ eslint@4.19.1
added 141 packages in 8.82s
jeddy3:stylelint-test jeddy3$ du -sh node_modules
 19M	node_modules

Is there anything we can do about this? @gucong3000 Is it worth optimising postcss-html for <style> tags and then making markdown and template literal parsing opt-ins? Am I right in thinking it's just the parsing of <style> which is most useful for Vue and Web Component authors?

@gucong3000
Copy link
Member

With the development of postcss-html, I changed its original design. Maybe I should find the right time to change its name. I used postcss-html for split file (not just html) for postcss syntax parsing

@jeddy3 jeddy3 added status: wip is being worked on by someone type: enhancement a new feature that isn't related to rules and removed status: needs discussion triage needs further discussion labels Apr 8, 2018
@gucong3000
Copy link
Member

I believe partly because postcss-html bundles a couple of parsers

I created a new package to solve: postcss-syntax (No dependencies)

parsers are move to postcss-html postcss-markdown and postcss-styled. Some of them maybe need to move from dependencies to optionalDependencies

@jeddy3 jeddy3 added status: needs discussion triage needs further discussion and removed status: wip is being worked on by someone labels Apr 16, 2018
@jeddy3
Copy link
Member Author

jeddy3 commented Apr 16, 2018

@gucong3000 Thanks for splitting the syntaxes into separate packages.

Once 9.2.1 is released, we can assess the new install size of stylelint. We can then discuss:

  1. which syntaxes we should bundle with stylelint by default
  2. which syntaxes should be used via the --custom-syntax flag

for stylelint@10.0.

@jeddy3
Copy link
Member Author

jeddy3 commented May 17, 2018

I created a new package to solve: postcss-syntax (No dependencies)

I'll close this issue then.

We can move the discussion what about should be included by default to #3264

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs discussion triage needs further discussion type: enhancement a new feature that isn't related to rules
Development

Successfully merging a pull request may close this issue.

2 participants