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

Add "prepare" as alias to "build" by default #1283

Open
vmx opened this issue May 24, 2023 · 0 comments
Open

Add "prepare" as alias to "build" by default #1283

vmx opened this issue May 24, 2023 · 0 comments

Comments

@vmx
Copy link
Member

vmx commented May 24, 2023

Is your feature request related to a problem? Please describe.

npm allows to point to GitHub repositories for packages. This is useful during development. Usually you would make changes locally and link them. When you then want to share it with others, they also need to go through some linking steps. Pointing to a GitHub repository directly makes sharing easier. Someone can just check it out and do a build as usual, no additional steps needed.

Most projects using Aegir need a build step, especially the TypeScript ones. The problem is, that those point their exports to the build artifacts. If you use those as a direct GitHub dependency the build will fail, as the repository obviously only contains the source, but not the artifacts.

Describe the solution you'd like

Therefore I'd like to introduce the "prepare" script. It would be an alias for "build". If such a prepare script exists, then npm will automatically run that after fetching the project from GitHub. This way the exports work as expected as the build artifacts are now there.

Describe alternatives you've considered

One could add the prepare script manually whenever you do such a fork. The problem is, that you need to be aware that that's one solution to the problem (I wasn't until recently).

You could also check-in the build artifacts into your fork. But also that is less convenient.

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

1 participant