[2.x] Install NPM dependencies and build assets#1119
Conversation
|
Love this! I'm currently doing this for users of Socialstream 🎉 |
|
@jessarcher ohh just had a thought - with this addition to Jetstream, users of my package would now need to wait twice whilst the frontend is compiled... what are your thoughts on making this option configurable for other package maintainers that rely on Jetstream as a basis for their packages? |
|
I have just tested this on my Mac, and the NPM install process worked as expected and had the colourised output as well 🤩 |
|
Hey @joelbutcher, how much of an impact do you expect this to have? I don't see an issue with As for the build, it's a bit unfortunate that it would run twice, but the build is very fast with Vite. I'm hesitant to add another option to the install command, but if this PR is accepted, you're of course welcome to open a PR for it. |
|
@jessarcher The impact probably wouldn't matter that much. I'm not updating the package.json AFAIK (will check later). The build time with Vite is much less of a concern actually, I hadn't considered that tbh |
This PR updates the Jetstream installer to automatically run the
npm installandnpm run buildcommands for you.Currently, the Laravel installer automatically runs these commands when it installs Jetstream. Moving it to this package makes the installation more consistent no matter how you install it. I have created laravel/installer#242 to remove these from the Laravel installer.