shashkovdanil / clean-publish

Removing configuration files and fields in package.json before publishing to npm

Home Page:https://www.npmjs.com/package/clean-publish

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow to run script on the to-release dir

ai opened this issue · comments

I want to run a small script during the release (which will transform ESM files to CJS). clean-publish is a perfect place.

I am suggesting this API. package.json:

  "clean-publish": {
    "beforeScript": "esm-compiler"
  }

clean-publish will call esm-compiler /home/ai/Dev/project/tmp-jv4j3hvj3.

@shashkovdanil what do you think?

@shashkovdanil do you need PR for it?

@ai, yes, ty