samples-browser
samples-browser copied to clipboard
NPM publish example missing?
I am looking for the example the npm helper example that is mentioned here:
https://www.npmjs.com/package/fable-helpers-sample
I would like to introduce Fable at work by moving some F# code currently running on the server to the browser. Our team uses Typescript and is unlikely to start using F# for frontend development. However, if I can package the code as an npm module that we can use from typescript, that could probably be a foot in the door to demonstrate the benefits of running F# code on the client.
You're right, I removed it because the instructions had to be updated. I'll publish it again so you can convince your team to use F# libraries in the frontend ;) Thanks for the reminder!
Thanks. And thank you for Fable. It is such a gift to the F# community. :-)
When I package my Fable module, would I need to create the typescript bindings for the interface or is this generated?
Unfortunately, this is not possible at the moment, you need to write the TS declarations manually. A similar topic is discussed in https://github.com/slogsdon/Fable.Template.JavaScriptLibrary/pull/3#issuecomment-334190291.
BTW, that repo, though it still requires some work probably, is also an example of writing a Fable project that's also exposed as a JS library.