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

Unecessary npm scripts when using `--without-publish`?

niksy opened this issue · comments

Are these scripts necessary if --without-publish is used?

  • version
  • postversion
  • postpack
  • prepublish
  • publish
  • postpublish

--without-publish was added to test the result of normal run. So, I believe that it should be equal to normal run.

What do you plan to use without-publish?

@ai it’s related to #53

For example, if you use --contents flag of np, I think it’s unecessary to set publish scripts in distribution package directory since those scripts will be executed inside current directory. So basically, setting this flag just prepares directory with final package content and it’s up to you to publish it.

Or, maybe there could be another option for achieveing this?

We can remove scripts used during publish, but not used on user’s machine 👍. Send PR.

Am I right that none of these scripts will be used during npm i YOUR_PACKAGE?

Am I right that none of these scripts will be used during npm i YOUR_PACKAGE?

Those are scripts which are mainly used on publishing. postinstall and uninstall are left since they are used on install.