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

Exclude unnecessary files #177

Merged
merged 2 commits into from
Jun 21, 2019
Merged

Exclude unnecessary files #177

merged 2 commits into from
Jun 21, 2019

Conversation

Kikobeats
Copy link
Contributor

Hello,

Since all the main browser/Node.js are pointing to a file inside dist folder, I think that the rest of files inside files field can be removed in order to reduce the package size.

@remusao
Copy link
Owner

remusao commented Jun 21, 2019

Hey,

Thanks a lot for opening this PR. Originally I decided to leave the original source code in the package so that project could import the TypeScript files directly. But I guess that does not happen and the type definitions from dist are enough. Seems fine to remove. Did you maybe measure the size difference with this change?

@remusao
Copy link
Owner

remusao commented Jun 21, 2019

Answering my own question.

before:

npm notice package size:  568.6 kB                                
npm notice unpacked size: 1.6 MB
npm notice total files:   47  

after:

npm notice package size:  484.9 kB                                
npm notice unpacked size: 1.4 MB                                  
npm notice total files:   32 

To save even more maybe it would make sense as a next step to publish tldts and tldts-experimental as two separate packages. I see you are using lerna extensively in your projects, I guess it could be useful for this purpose as well.

Merging this as it provides a significant gain already.

Thanks again!

@remusao remusao merged commit 5fd58fc into remusao:master Jun 21, 2019
@remusao remusao mentioned this pull request Jun 21, 2019
remusao added a commit that referenced this pull request Jun 21, 2019
Release v5.2.0

* Exclude unnecessary files from package.json [#177](#177)
@remusao
Copy link
Owner

remusao commented Jun 21, 2019

Released v5.2.0 (will be available on npm shortly).

@Kikobeats Kikobeats deleted the patch-1 branch June 21, 2019 12:12
@Kikobeats
Copy link
Contributor Author

Yes, in addition, CLI could be a separated package, like tldts- cli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants