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

Unecessary npm scripts when using --without-publish? #125

Open
niksy opened this issue Sep 29, 2021 · 4 comments
Open

Unecessary npm scripts when using --without-publish? #125

niksy opened this issue Sep 29, 2021 · 4 comments

Comments

@niksy
Copy link

niksy commented Sep 29, 2021

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

  • version
  • postversion
  • postpack
  • prepublish
  • publish
  • postpublish
@niksy niksy changed the title Unecessary npm scripts when using --without-publish Unecessary npm scripts when using --without-publish? Sep 29, 2021
@ai
Copy link
Collaborator

ai commented Sep 29, 2021

--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?

@niksy
Copy link
Author

niksy commented Sep 29, 2021

@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?

@ai
Copy link
Collaborator

ai commented Sep 29, 2021

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?

@niksy
Copy link
Author

niksy commented Sep 29, 2021

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.

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