Closed dherman closed 3 months ago
Should it be prepare
and exist for both apps and libraries?
Should it be
prepare
and exist for both apps and libraries?
Libraries aren't built on demand, they're built remotely on the CI/CD server across the full platform matrix and the binaries are published separately. The library itself doesn't require any local build process.
For apps, I think you're right that "prepare"
is the right call.
I added this to #1041.
The prepare
hook only runs before a publish. That's not something we want to take advantage of for libs?
The prepare
hook runs both before publish and install. You might be thinking of prepublishOnly
, which only runs before publish.
For libs, we can't make use of a publish hook because it's synchronous, and libs need to fork off a bunch of remote prebuilds running on CI/CD servers. So publishing is actually done via CI/CD instead of locally. But if you can think of a way to do this with an npm publish
workflow, I'm open to it!
Is there some other hook we can use that always gets run when you locally pull for both types?
Can you say more? I don't quite know what you mean by locally pull.
Followup: based on discussion in #1041, we agreed that this isn't a great idea after all. Rationale:
npm run build
.
There's no
"install"
hook for--app
projects created by the newcreate-neon
.