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

using dependencies #681

Open
tcurdt opened this issue Mar 6, 2023 · 3 comments
Open

using dependencies #681

tcurdt opened this issue Mar 6, 2023 · 3 comments

Comments

@tcurdt
Copy link

tcurdt commented Mar 6, 2023

The single function is nice and simple - but not all is THAT simple.

How does one use libraries?

package.json, go.mod, cargo.toml, gemspec, ...

@metrue
Copy link
Owner

metrue commented Mar 7, 2023

Hey @tcurdt , fx does support before_build hook to do the dependency installation, but it has not been added into documentation yet. you can check here.
https://github.com/metrue/fx/blob/master/hook/hook_test.go#L9

and you can just simply add .hooks/before_build file into your directory, and write your installation script into it.

@tcurdt
Copy link
Author

tcurdt commented Mar 7, 2023

Sorry if I was quicker than the docs :)

So something like this should work?

.hooks/before_build -> `npm install`
main.js
other.js
package.json

other.js and everything in node_modules should then be available?

Thanks!

@metrue
Copy link
Owner

metrue commented Mar 9, 2023

@tcurdt Yeah, it should be, let me know it does not.

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