samples-browser icon indicating copy to clipboard operation
samples-browser copied to clipboard

NPM publish example missing?

Open rookboom opened this issue 8 years ago • 3 comments

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.

rookboom avatar Sep 26 '17 02:09 rookboom

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!

alfonsogarciacaro avatar Sep 26 '17 07:09 alfonsogarciacaro

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?

rookboom avatar Oct 14 '17 19:10 rookboom

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.

alfonsogarciacaro avatar Oct 16 '17 08:10 alfonsogarciacaro