Closed StephanHoyer closed 2 years ago
If you like this idea, I would create a PR for this
Hi
This sounds very interesting. The current loader feels a bit hacky and not very idiomatic (I‘m not a node pro).
I look forward to your pull request. This would be a nice feature for version 5, that I‘m currently working on…
Kind regards, Mathias
PS: feel free to communicate in german.
Ok, ich schaue wann ich das schaffe. Vermutlich aber noch diese Woche.
Noch keine Zeit gefunden. :/
Es eilt ja auch nicht. Als ich schrieb, dass das in die Version 5 reinpasst, meinte ich vor allem, dass wir damit eine grosse Freiheit haben, wenn wir das API ändern wollen...
@mnater done!
it's a minor
-change
Hi, first of all, great project. We really like it.
But we have a few problems integrating it. The dynamic loader gives us real troubles. We use the node-version also in the browser since we want better control over the hyphenation and pretty much only hyphenate strings and do the rendering with mithril.js.
Currently the the loader autodetects the environment. This is not really useful for us. A better option would be to have an optional argument
loader
which pretty much has the same signature as readFile. This would greatly improve usability. It also would allow to prefetch/embed certain lang files and treeshare the loader out of the package and rely on the user solution for loading