Closed Zaid-Ajaj closed 6 years ago
This looks beautiful, thanks a lot! We can polish the details later :+1:
Thanks! there is still a lot to do before this becomes usable. Btw, is it just me or did the compilation become a lot faster with the new fable-loader, it is still running and communicating with a daemon?
I haven't benchmarked it but Fable is now a subprocess of Node (the other way around) and the communication is done through stdin-stdout so it's possible it's faster than the TCP daemon. The startup is (or at least feels) much faster now, because the dotnet cli tool took a few seconds to start.
Very interesting, the compilation does feel a bit lighter now! Does this also mean you need to publish a new fable-loader/splitter whenever you update the compiler itself?
Yeah, we'll have to rethink a bit the compiler version management for 2.1. Right now is a (hidden) dependency of fable-loader@next
which only pins the minor version: fable-compiler-dotnet: ~2.1.0
. It seems running npm update
won't update fable-compiler-dotnet if fable-loader hasn't changed, so users will have to know about it to update it explicitly... or maybe it's better to just put the binaries directly in the fable-loader/fable-splitter packages and indeed pushing a new version every time the compiler, but this can be a problem to sync version when there are changes in fable-loader/fable-splitter themselves (not the compiler) 🤔
Description
Shows how to compose small components with self-contained html template into bigger components instead of registering them globally
Usage
DraggableHeader.fs
DraggableHeader.html
Then use
draggableHeader
from a bigger component,App.fs
with
App.html
At last, mount
app
onto a rootLoaders
using
raw-loader
to load the html at compile-time as a the template stringChanges
Changes the library name
Fable.VueJs
and the main module name toVue
Problems
I have no idea how to communicate data between the two, i.e. with props, at least I haven't tried to get working
Also having to define dummy
init
andupdate
when I don't need them