clean-publish icon indicating copy to clipboard operation
clean-publish copied to clipboard

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

Open niksy opened this issue 4 years ago • 4 comments

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

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

niksy avatar Sep 29 '21 09:09 niksy

--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 avatar Sep 29 '21 10:09 ai

@ai it’s related to https://github.com/shashkovdanil/clean-publish/issues/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?

niksy avatar Sep 29 '21 11:09 niksy

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?

ai avatar Sep 29 '21 11:09 ai

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.

niksy avatar Sep 29 '21 11:09 niksy