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

how to hook in to publish a bundle with injected version #718

Open
JoernT opened this issue Oct 24, 2023 · 1 comment
Open

how to hook in to publish a bundle with injected version #718

JoernT opened this issue Oct 24, 2023 · 1 comment

Comments

@JoernT
Copy link

JoernT commented Oct 24, 2023

I'd like to use rollup-plugin-version-injector to inject a version property into my bundle but i can't find the right hook to do so with np. I tried several of the hooks like 'prepublish' 'version' and 'publish' but np always quits as the called script will modify the git and np exits.

Any help appreciated.

@dhowe
Copy link

dhowe commented Nov 13, 2023

Same problem here with tsup version injector. I basically want to do the following steps in order when I publish:

$  npm version patch
$  npm run build
$  np --no-version-change

Is there a way to run np without a version change?

@JoernT did you find a solution ?
@sindresorhus any suggestion here ?

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