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

uglifyjs missing from dependencies list #4

Open
joepie91 opened this issue Jul 8, 2020 · 2 comments
Open

uglifyjs missing from dependencies list #4

joepie91 opened this issue Jul 8, 2020 · 2 comments

Comments

@joepie91
Copy link

joepie91 commented Jul 8, 2020

The build script uses uglifyjs, but this is not declared in the devDependencies list. The build in the package can be exactly reproduced with uglify-js@~2.5.0, but presumably later versions of uglify-js should also result in a working build.

As an aside, it would be preferable not to include a .min.js in the package on npm at all, and either distribute it separately or let people's own bundler handle the minification step - if someone is installing the dependency through npm, chances are they already have their own build stack anyway, and including minified code in the npm package makes it more difficult to audit the dependency.

@MikeMcl
Copy link
Owner

MikeMcl commented Jul 8, 2020

uglifyjs missing from dependencies list

Yes, it's missing and should be added. As is the case with all my libraries...

As an aside, it would be preferable not to include a .min.js in the package on npm at all

Yes, I could leave it in the repo but remove it from the npm package.

Also, I could commit a package-lock.json and yarn.lock file.

@joepie91
Copy link
Author

joepie91 commented Jul 9, 2020

Yes, I could leave it in the repo but remove it from the npm package.

That seems like a reasonable solution.

Keep in mind that adding an .npmignore will override the .gitignore in your repo from npm's perspective, not add to it, so you need to copy the contents of any .gitignore files into it as well. Mentioning this because it trips up a lot of people :)

Also, I could commit a package-lock.json and yarn.lock file.

That would help for reproducibility as well, yeah, at least having one of them if it's not practical to have both for every project. Thanks!

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

2 participants