fx icon indicating copy to clipboard operation
fx copied to clipboard

using dependencies

Open tcurdt opened this issue 2 years ago • 3 comments
trafficstars

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, ...

tcurdt avatar Mar 06 '23 23:03 tcurdt

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.

metrue avatar Mar 07 '23 06:03 metrue

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!

tcurdt avatar Mar 07 '23 14:03 tcurdt

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

metrue avatar Mar 09 '23 08:03 metrue