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

Npm prepare script #7

Merged
merged 2 commits into from
Feb 6, 2020
Merged

Conversation

spautz
Copy link
Contributor

@spautz spautz commented Feb 5, 2020

This comes from a comment on issue #6

This sets a prepare script in package.json, which will run on build and also anytime the repo itself is installed (either as a local clone or via something like "dependencies": { "react-reverse-portal": "github:httptoolkit/react-reverse-portal#1fa7488" }).

This ended up being much simpler than I realized: prepare is a superset of prepack, so just renaming the script seems to cover all of the cases.

I also ran into an issue when trying to npm run build the first time after cloning the repo, due to a typescript issue: there was no declaration file for the 'events' module (which is a sub-dependency of webpack). Installing @types/events fixed this, so this PR includes that change. I suspect that adding a package-lock might also fix it, but it looks like that's intentionally disabled so I didn't explore it.

@pimterry
Copy link
Member

pimterry commented Feb 6, 2020

Looks good to me, thanks! 👍

@pimterry pimterry merged commit b633934 into httptoolkit:master Feb 6, 2020
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

Successfully merging this pull request may close these issues.

2 participants