These are chat archives for ractivejs/ractive

5th
Jun 2017
kouts
@kouts
Jun 05 2017 18:49
Short question: I have a loop inside a loop in my HTML template and I want to get the @keypath inside the second loop, is there any other way to get instead of using a {{#with}} section?
Joseph
@fskreuz
Jun 05 2017 18:56
Sort of hacky but... {{@keypath.split('.').slice(0, -1).join('.') }}? :D
Chris Reeves
@evs-chris
Jun 05 2017 18:56
So {{#each outer}}{{#each inner}} outer keypath here? {{/each}}{{/each}}?
If you just need a ref, you can pop contexts using the hmmmmm prefix ^^/
Joseph
@fskreuz
Jun 05 2017 18:57
@evs-chris probably has better aliasing sorcery than me :D
Chris Reeves
@evs-chris
Jun 05 2017 18:58
if you need the actual keypath string, then you'll need a {{#with @keypath as whatever}} wrapping the inner loop
if you're on 0.9, need the keypath string, and don't mind a computation, @context.resolve('^^/')
kouts
@kouts
Jun 05 2017 19:23
Thank you, I'm on 0.8 (testing 0.9), {{#with}} did the trick, nice to know @context.resolve('^^/') also works
@fskreuz do you think you can add the search functionality back to the docs?
even inside the popup it was really helpfull
still try to find my way through the new docs
Joseph
@fskreuz
Jun 05 2017 19:25
Yep, I could add it back.
Juan C. Andreu
@andreujuanc
Jun 05 2017 19:25
+1 on search
Joseph
@fskreuz
Jun 05 2017 19:29
The API section should (hopefully) contain everything you need tho.
Matt Granmoe
@granmoe
Jun 05 2017 19:29
@fskreuz you mentioned the ractive docs playground is implemented using ractive. Is the source code available somewhere? Couldn't find it in the main ractive GH repo
or if anyone else as an OSS real world app to look at, that would be awesome
Joseph
@fskreuz
Jun 05 2017 19:30
https://github.com/ractivejs/playground is its main repo. The one on the docs is just a copy of it, iirc.
Matt Granmoe
@granmoe
Jun 05 2017 19:30
ah perfect! Thanks @fskreuz, not sure why I couldn't find that
Joseph
@fskreuz
Jun 05 2017 19:40
Probably the largest Ractive app I've ever seen.
Chris Reeves
@evs-chris
Jun 05 2017 21:26
does anyone happen to know how npm orgs work?
for instance, are they explicitly limited to scoped packages, or can they publish non-scoped as well?
Chris Reeves
@evs-chris
Jun 05 2017 21:47
getting ready to publish ractive-bin-loader for webpack, but I'd like to do it in a way that doesn't keep other maintainers from publishing in the future
if that plays out, we can get publish rights adjusted so that we can keep other modules more up-to-date
scoped packages are ugly
Joseph
@fskreuz
Jun 05 2017 22:14
Define "ugly"? :D
Chris Reeves
@evs-chris
Jun 05 2017 23:19
import Ractive from '@ractivejs/ractive';
Joseph
@fskreuz
Jun 05 2017 23:20
yep, reminds me of angular 2 :D
Chris Reeves
@evs-chris
Jun 05 2017 23:20
scoped packages get a subdir of their scope in node_modules
Joseph
@fskreuz
Jun 05 2017 23:29
speaking of keeping modules up to date, what do people think about moving the plugins (just the plugins, not Ractive) into a monorepo?
Like everything is in a ractive-plugins repo, then on publish, they go to npm as separate packages, and to github on dummy repos (for Bower). Publishing is automated of course.
And every new Ractive build, a build is also triggers on the plugins that tests them against the new Ractive build.