Dependencies are for specific functions, and not libraries. And there is no namespacing, all the libraries that are included are merged into a single space. So if you add both of those libraries with two --js-library commands, then the deps can say ['hello'] (instead of ['LibA']) and then it can be called from the other one (with _hello(), note the underscore prefix).
On Thu, Feb 28, 2019 at 3:08 AM Oleg Martynevskyi < [email protected]> wrote: > var LibA = { > hello: function() { > console.log("hello"); > } > } > > mergeInto(LibraryManager.library, LibA); > > var LibB = { > $data__deps: ['LibA'], > $data: { > callToLibB: function() { > How could I call function help from libA? > } > } > } > > autoAddDeps(LibB , '$data'); > mergeInto(LibraryManager.library, LibB); > > > > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
