These are chat archives for ractivejs/ractive

29th
Sep 2017
kouts
@kouts
Sep 29 2017 12:50 UTC
Turns out positioning the popover was not a trivial task so I decided to go with a combination of bootstrap (which is already used in the project) and ractive decorator + component for dynamic content
Joseph
@fskreuz
Sep 29 2017 12:51 UTC
I smell a feature request :D
kouts
@kouts
Sep 29 2017 12:51 UTC
will post code if anyone is interested
Joseph
@fskreuz
Sep 29 2017 12:51 UTC
You can open an issue on Github so we can track it down (and potentially implement) :D
kouts
@kouts
Sep 29 2017 12:51 UTC
@fskreuz your example helped me a lot, thank you!
@fskreuz I think for me Ractive is complete feature wise, the link that is missing is a router "a-la vue-router" and some way to auto lazyload components with their children.
kouts
@kouts
Sep 29 2017 12:57 UTC
Ractive is so easy to get started, but when you need more things -if you're not an experienced js ninja- combining external libs to suit is a difficult task
lazylester
@lazylester
Sep 29 2017 14:14 UTC
regarding: component files... the docs indicate that partials can be pulled in from an external file using the src attribute on a script tag
anyone used this successfully?
I'm having a problem
looks as if fs.readFile needs full path
not relative path as src provides
Chris Reeves
@evs-chris
Sep 29 2017 14:15 UTC
are you on edge or a 0.9?
lazylester
@lazylester
Sep 29 2017 14:17 UTC
I think it's 0.9.3 b/c that's the latest on npm
but the issue is in ractive-bin-loader, I think
oh, maybe it's ractive, b/c ractive-bin-loader calls ractive component.js
lazylester
@lazylester
Sep 29 2017 14:47 UTC
I don't know how one would spec version 1.0.0-buildnn in package.json, if I would like to use it
Chris Reeves
@evs-chris
Sep 29 2017 15:17 UTC
yep, there's definitely something up with loading external files
you can declare a dependency on ractive@edge to pull in the latest tag, but it won't update automatically if that's something you do
it's past time for a 0.9.5, though
lazylester
@lazylester
Sep 29 2017 15:22 UTC
my hack in ractive-bin-loader/index.js is to add file = path.join(self.context, file) before the fs.readFile line (sorry, don't know how to do the fancy code formatting here)
how do you declare the ractive@edge dependency in package.json? dependencies is a hash with values like ractive:'^0.9.3'
lazylester
@lazylester
Sep 29 2017 15:27 UTC
return new Promise((ok, fail) => { file = path.join(self.context, file) fs.readFile(file, { encoding: 'utf8' }, function(err, data) { if (err) return fail(err); ok(data); });
ok, markdown skills not so good!
Chris Reeves
@evs-chris
Sep 29 2017 15:28 UTC
you can also specify tags e.g. ractive: 'edge' or non-release builds e.g. ractive: '1.0.0-build-70'
lazylester
@lazylester
Sep 29 2017 15:29 UTC
really? how does it know the source? npm doesn't have 'edge' for ractive, does it?
Joseph
@fskreuz
Sep 29 2017 15:29 UTC
npm info ractive will show you what versions are available and what aliases like latest and edge point to.
Chris Reeves
@evs-chris
Sep 29 2017 15:30 UTC
yep, we tag all of our dev/edge releases when they are published to npm
you can pull a fresh edge release with npm i ractive@edge
lazylester
@lazylester
Sep 29 2017 15:33 UTC
OK, very helpful thanks, I'll switch to 1.0.0 for my npm. npm info ractive ftw!
(that's ftw, not wtf)
Joseph
@fskreuz
Sep 29 2017 15:34 UTC
I use them interchangeably at times :P
Chris Reeves
@evs-chris
Sep 29 2017 18:06 UTC
@lazylester that was definitely a problem with ractive-bin-loader, and that's also the fix
thanks!
Chris Reeves
@evs-chris
Sep 29 2017 18:25 UTC
ractive-bin-loader 1.0.2 has been published with much more working external file loading
lazylester
@lazylester
Sep 29 2017 18:40 UTC
thanks @evs-chris what a great team we are!
Chris Reeves
@evs-chris
Sep 29 2017 19:15 UTC
:+1:
question of the day: or rather - small essay of the day posing a number of mostly related questions: #3099