Submit

Back to the channels

#primate

  1. blue phaleth: hi
  2. phaleth hi blue
  3. blue @primate/marko is going to experiment with publishing source files to npm; particularly .marko tags. I'm pushing for edge compilation
  4. phaleth edge compilation?
  5. blue yes, the app itself should be the one compiling
  6. blue the traditional npm trade is to precompile and then serve something like a dist.js or so
  7. blue that is in some ways good and in many ways terrible
  8. phaleth the compiler is gonna be sent to the client?
  9. blue s/npm trade/npm way/
  10. blue no
  11. phaleth or as a dev tooling?
  12. blue we're gonna publish source files, and the one compiling them is the app (in this case primate)
  13. phaleth ok, so devDependency then
  14. blue that is because the app knows best what it needs, and what are the conditions for compiling the source files
  15. blue it's not directly related to devDependency
  16. blue it's just the question whether you precompile non-js or not
  17. blue if you precompile, you're more inclusive in who can consume it
  18. blue but the truth of the matter is that you're only ever going to consume .marko files if you use marko, or .svelte files if you use svelte
  19. blue you're not going to have a general-purpose, non-svelte apps that consumes a .svelte file
  20. blue app*
  21. phaleth well, if it's some kind of optimizing compiler then I guess that's fine, but a lot of them are not
  22. blue so alongside @primate/marko, I'm providing two tags: <Field> and <Form>
  23. blue the question is whether I precompile them or not
  24. blue I decided to not precompile them
  25. blue and just publish them directly to npm
  26. phaleth npm is full of broken stuff
  27. phaleth I mean non-js
  28. blue yes, and I'm adding more broken stuff
  29. blue but precompilation in the case of npm is the devil's work
  30. phaleth at least you name it .marko and not .js
  31. blue yes, the svelte guys keep doing that and it drives me inside
  32. blue s/inside/insane/
  33. blue there's more beauty to it, though: I'm using the `marko` runtime key to drive that compilation
  34. blue this is arguably one of the best use cases of runtime keys
  35. blue https://github.com/primate-run/primate/commit/b0eb1187313cdd49946c5b46d7bbef8df688e004
  36. nevet marko: full support for version 6 · primate-run/primate@b0eb118
  37. blue you can see the work here. it doesn't include the .marko runtime key yet though
  38. blue note that unlike all the other frontends we support, marko does not have a meta framework for it, so primate's gonna be the first (that I know of, anyway)
  39. phaleth if marko can replace svelte on primate website while not adding more bloat then lets use marko
  40. blue that's the idea, and it might work for 0.38
  41. blue 0.39*

Search posts