These are chat archives for ractivejs/ractive

16th
Mar 2018
kouts
@kouts
Mar 16 2018 08:44
Guys, what's your take on this: kouts/ractive-modal#3
should ractive-modal have delegate: false by default or should it inherit the default from Ractive itself?
This came up when using ractive-modal inside a loop.
Cerem Cem ASLAN
@ceremcem
Mar 16 2018 08:48
in addition to @kouts question: "Would delegate: true have any effect from delegate: false if a component has only one instance across the application?"
kouts
@kouts
Mar 16 2018 08:54
@ceremcem you rarely have only one instance of ractive-modal across an application, I have views with 15+ different modals inside :smile:
Chris Reeves
@evs-chris
Mar 16 2018 13:40
unless you have giant iterative sections inside your modal, I'd say you won't even notice delegation being turned off
kouts
@kouts
Mar 16 2018 13:43
that really depends on the use, I have modals that play the "role" of entire views in my app
Paul Maly
@PaulMaly_twitter
Mar 16 2018 16:32
l’m working on public version of my “ractive-isomorphic-starterkit”. This kit gives an easiest way to start fully isomorphic (universal) web-app with webpack and commonjs modules. 100% shared app code, if you needed. Completely ready for Progressive Enhancement.
Main features:
1) built-in web server on express;
2) built-in api requests proxy and sessions.
3) built-in isomorphic state-based routing with history and meta-tags support.
4) built-in SSR & data propagation to the client to prevent double fetching.
5) Zero configuration to start.
feedback preferable
No docs right now, but simple “Hello world” example included.
npm i
npm run build
npm run start
localhost:8080
Chris Reeves
@evs-chris
Mar 16 2018 19:00
nice
I've had good experiences using a shell script to start the build step in watch mode backgrounded and following up with the server script in the foreground
also, stringifying the parser output loses the precompiled expression functions
Joseph
@fskreuz
Mar 16 2018 19:03
One of Ractive's older loaders/utils also used https://github.com/marcello3d/node-tosource
Juan C. Andreu
@andreujuanc
Mar 16 2018 19:08
guys, i know it's not the right place, but i know you all have lots of experience so. Here it goes:
installed npm package from a github location
package is not updating
and its on a different branch than main
Anyone had any issue like this?
Joseph
@fskreuz
Mar 16 2018 19:11
Few questions:
  • What version of npm?
  • What command did you run for install?
  • What version string appears on the package.json?
  • What's the repo's default branch?
Paul Maly
@PaulMaly_twitter
Mar 16 2018 19:18

also, stringifying the parser output loses the precompiled expression functions

what do you mean?

Anyone had any issue like this?

could you please provide package.json file?

Paul Maly
@PaulMaly_twitter
Mar 16 2018 19:24

what do you mean?

oh, seems I got it. any suggestions?

Paul Maly
@PaulMaly_twitter
Mar 16 2018 19:30

@fskreuz
You can always use this https://github.com/yahoo/serialize-javascript
One of Ractive's older loaders/utils also used https://github.com/marcello3d/node-tosource

seems, it's a good idea. I'll try it.

Juan C. Andreu
@andreujuanc
Mar 16 2018 20:03
v5.3
npm install user/repo#branch and also tried to set what commit i wanted #3123123
No versions, im targeting github
master is the default branch
@fskreuz :(
i got potato and git clone'd the repo inside npm xDD xD xD xD
Paul Maly
@PaulMaly_twitter
Mar 16 2018 20:05
"dependencies": {
  "package": "github:username/package#commit"
}
not working?
Cerem Cem ASLAN
@ceremcem
Mar 16 2018 20:05
@andreujuanc have you ever succeeded before (and this behaviour is started suddenly) or you've never succeeded yet
Paul Maly
@PaulMaly_twitter
Mar 16 2018 20:08
@andreujuanc maybe your lock-file contains incorrect branch?
Cerem Cem ASLAN
@ceremcem
Mar 16 2018 20:11
+1 for possibility of lock-file issue
Juan C. Andreu
@andreujuanc
Mar 16 2018 20:12
ohhh
let me check that
Joseph
@fskreuz
Mar 16 2018 20:12
iirc, npm prefers the lock file when it sees one.
Cerem Cem ASLAN
@ceremcem
Mar 16 2018 20:13
when you add a repo from github, it ends up downloading the latest version (or the exact commit/tag) in node_modules folder except the files listed in .npmignore in the git repo's root
Joseph
@fskreuz
Mar 16 2018 20:13
you can add an .npmrc in the root of the project and add package-lock=falseto prevent lockfiles.
Cerem Cem ASLAN
@ceremcem
Mar 16 2018 20:15
@fskreuz aha! that was one of the things I was looking for :)
Juan C. Andreu
@andreujuanc
Mar 16 2018 20:15
ohh
ill copy pasta this convo
cos need to get my friends laptop
he got offline D:
was doing remote
but damn, idk why npm is so complex
shoudnt be
even webpack realized that now in v4
I want to code, not to configure stuff D:
thanks guys,!! new i was going to get some nice info about this
Cerem Cem ASLAN
@ceremcem
Mar 16 2018 21:05
@kouts are you sure this is mandatory? ractive.observe does perform its .cancel() call on teardown AFAIK
Juan C. Andreu
@andreujuanc
Mar 16 2018 22:14
I think in that case it is. It's teareddown when it's created on init. But, im not 100% sure
Someone talked about this few days ago. Cant find that convo.
Cerem Cem ASLAN
@ceremcem
Mar 16 2018 22:20
I've used millions of observers in my applications and never performed such a "cleanup". I want to know if that's the case, so I can plug any possible leaks.
Joe Turner
@JoeTurner-IR
Mar 16 2018 22:21
it was me talking about this I think
the observers do get cancelled on teardown
in the code you posted @ceremcem the observer is being cancelled on unrender, no idea if that's an alias for teardown or if it's actually something different
and therefore there's some reason behind doing it there
earlier in the lifecycle therefore something something?
Cerem Cem ASLAN
@ceremcem
Mar 16 2018 22:27
if a component is being unrendered, it will be torn down in the next step IIRC
Juan C. Andreu
@andreujuanc
Mar 16 2018 22:29
Anyway to search on gitter chat history?
Cerem Cem ASLAN
@ceremcem
Mar 16 2018 22:31
image.png
Cerem Cem ASLAN
@ceremcem
Mar 16 2018 22:38
@andreujuanc is that the conversation you mentioned?
Chris Reeves
@evs-chris
Mar 16 2018 23:23
components that are managed by ractive are automatically torn does. If you create an instance with new and are done with it, you should call teardown.
down* mobile
if an instance is torn down, any observers not references elsewhere will be eligible for garbage collection
Cerem Cem ASLAN
@ceremcem
Mar 16 2018 23:24
thanks Chris