-
Notifications
You must be signed in to change notification settings - Fork 259
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
No viable alternative to imagemin - applying for maintainer privileges #409
Comments
Invited you 👍 |
There are problems with relying on OS-installed dependencies too, like version incompatibilities. I would suggest exploring using WASM for some of these as it fixes almost all compatibility problems. For example, pngquant can be used from WASM: https://github.com/GoogleChromeLabs/squoosh/tree/dev/codecs/imagequant |
Also if you publish a major, can you make the package cjs compatible with an |
@Tofandel TBH this was also an issue for metalsmith-imagemin (which I pinned to the latest CJS-compatible imagemin plugins for my fork) as long as you support Node 12. FWIW you can use ESM modules in CJS builds by using dynamic imports starting in Node 13.something. Providing a dual build is definitely outside the scope of my involvement, but I could clarify in the README how to load it in a CJS build. @sindresorhus last thing: do you have a preferred Way of Working? Contributor's guide with maintainer section somewhere? Should I create branches and add you/someone as reviewer? Who pubs to NPM? I know you're super-busy, so I'm not sure you wish to be pinged for imagemin-related stuff. Perhaps you can point me to another active maintainer? 😄 |
You don't need a dual build but you do need a typescript base or a build step, I did it for @prerenderer by simply giving a "use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
const index_1 = __importDefault(require("./index"));
module.exports = index_1.default; Or before building in ts import def from './index'
export = def And then in the "exports": {
"import": "./dist/index.js",
"require": "./dist/cjs.js"
}, Works wonders, as this allows for both |
I don't intend to bring back CommonJS support. |
I don't have a guide. Just the normal best practices. New features should have tests. It's good to get a review on larger changes. Smaller changes can land directly on |
@ahmadnassri this thread should be of interest to you Sindre mentioned
Are you interested? If not I'm going to close this issue since I got invited to the GH org. |
@webketje thanks for the follow up, I don't think I can help with with a larger scope project like |
Hello there,
Since Squoosh completely removed their
@lib/squoosh
/ CLI package 2 weeks ago, the recommendation @sindresorhus gave in #385 no longer holds and Node.js users seeking a library for compressing images as part of a build pipeline are effectively left without any options.As the maintainer of metalsmith and supporting the metalsmith-imagemin plugin,
I would like to apply for maintainer privileges in the imagemin org + on npmjs.org (at least for the pngquant, svgo, webp, jpegoptim plugins).
I am aware pre-built binaries included in NPM packages come with their own set of issues.
However, I want to explore enabling users to take advantage of the easy-to-use interface of the imagemin packages while making using the prebuilt binaries optional.
My scope of involvement would be:
*-bin
libraries optional peerDependencies of theimagemin-*
plugins and making relying on the OS-installed dependencies the default (eg for using webp on Debian distro's, try callingwebp
first, which will fail if it is not in$PATH
).executablePath
.I'll adhere to the conventions in place (linters, esm-only, etc..)
The text was updated successfully, but these errors were encountered: