These are chat archives for ractivejs/ractive

15th
Dec 2017
Joseph
@fskreuz
Dec 15 2017 13:52
Everyone! Here's an issue that needs discussion. TL;DR: Externalizing partials when using a component-file workflow using <link rel="ractive-partial">
Martin Kolárik
@MartinKolarik
Dec 15 2017 14:15
:+1: but rel=ractive type=partial
Chris Reeves
@evs-chris
Dec 15 2017 15:34
yep, was going to suggest that too
Joseph
@fskreuz
Dec 15 2017 15:40
:facepalm: forgot to put the link ractivejs/component-spec#19
but yeah, also leaning towards rel="ractive" type="partial" (and explicit type="component" for components)
Disclaimer: I haven't had coffee yet
Anatoli Radulov
@avoto
Dec 15 2017 18:30
Thanks @fskreuz. While this is being brainstormed, I would like to throw yet one more idea in the same context. Similarly to supporting partial loading, also support externalizing and reuse of scoped CSS: <link rel="ractive" type="css"> or <link rel="ractive" type="component-css">
Joseph
@fskreuz
Dec 15 2017 18:39

Hmm... component CSS is meant to be scoped to the component only. If it becomes shared, it hints that either
1) your CSS is not component-specific and must be theme/mixin CSS (and tools like SCSS are better suited for doing that) or
2) you have a duplicate component (because why would they share CSS unless they were structurally identical in some ways) or

Also, for both partial and CSS cases, you can always use require('/path/to/file'). With the right loader/pre-processor, you can get the contents. No need for component file markup changes. I think requirejs does have a text loader plugin which can be used to load text files, css, templates, etc.