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 module size #5

Open
caillou opened this issue Sep 23, 2021 · 1 comment
Open

Reduce module size #5

caillou opened this issue Sep 23, 2021 · 1 comment

Comments

@caillou
Copy link

caillou commented Sep 23, 2021

As of now, these are the contents of the package:

fettepalette
├── .eslintrc
├── .github
│   └── workflows
│       └── main.yml
├── LICENSE
├── README.md
├── dist
│   ├── index.d.ts
│   ├── index.esm.js
│   ├── index.html
│   ├── index.iife.js
│   ├── index.js
│   └── index.js.map
├── fp.png
├── package.json
├── src
│   └── index.ts
└── tsconfig.json

Most of these files are not needed. Could you reduce them to the minimum?

To see what files will be included when publishing to npm, you can run npx npm-packlist.

In terms of code, all you need in the package is one js file and one d.ts file. You should leave the minifying, browser, esm and other builds to the users of your package. This being said, I might be wrong here.

@caillou
Copy link
Author

caillou commented Sep 23, 2021

For more information, read the following:

https://docs.npmjs.com/cli/v7/commands/npm-publish

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

No branches or pull requests

1 participant