Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 20 2016 01:59
    caspervonb opened #187
  • Jan 19 2016 14:16
    caspervonb synchronize #186
  • Jan 19 2016 14:16

    caspervonb on reorganize-docs

    doc: move getting-started guide… (compare)

  • Jan 19 2016 14:11
    caspervonb opened #186
  • Jan 19 2016 14:08

    caspervonb on reorganize-docs

    doc: rename man -> doc Having … doc: separate docs into sub-fol… (compare)

  • Jan 19 2016 13:14
    caspervonb opened #185
  • Jan 19 2016 13:14

    caspervonb on change-readme-banner

    doc: use banner image from medi… (compare)

  • Jan 19 2016 12:56
    caspervonb closed #184
  • Jan 19 2016 12:56
    caspervonb commented #184
  • Jan 16 2016 21:45
    caspervonb opened #184
  • Jan 15 2016 16:10
    caspervonb opened #183
  • Jan 15 2016 01:21
    caspervonb closed #182
  • Jan 15 2016 01:21
    caspervonb closed #128
  • Jan 15 2016 01:21

    caspervonb on master

    doc: add contributing document … (compare)

  • Jan 15 2016 01:17

    caspervonb on contributing

    doc: add contributing document … (compare)

  • Jan 15 2016 01:17
    caspervonb synchronize #182
  • Jan 14 2016 18:22
    caspervonb opened #182
  • Jan 14 2016 18:19

    caspervonb on contributing

    doc: add contributing document … (compare)

  • Jan 14 2016 17:01
    caspervonb opened #181
  • Jan 13 2016 04:41
    rgbkrk commented #101
Jigar Gosar
@jigargosar
Also one more thing, are there any gotchas related to hot reload, that I need to be aware of?
Rasmus Porsager
@porsager
I assume you use some kind of vdom in your app. which one ? (mithril?)
Jigar Gosar
@jigargosar
@porsager will definitely ask for your help if I get stuck.
no vdom, simple mustache template, and jquery to replace when the model changes.
Rasmus Porsager
@porsager
ok... you just need to remember to redraw on scriptChange
I've got an entry point to my app that looks like this:
Jigar Gosar
@jigargosar
model is an immutable json, which gets regenerated using Ramda upon user modification.
Rasmus Porsager
@porsager
import m from 'mithril'

window.addEventListener('scriptChange', m.redraw)

window.addEventListener('fileChange', function(event) {
  var filename = event.detail.filename
  console.log(filename)

  if (filename.match(/(.jpg|.png|.webm)$/)) {
    var imgs = document.querySelectorAll('img[src*="'+ filename + '"]');

    [].forEach.apply(imgs, function(img) {
      img.src = event.detail.filename + '?' + performance.now()
    })
  } else if (filename.match(/.css$/)) {
    var link = document.querySelector('link[href*="'+ filename + '"]')
    link.href = event.detail.filename + '?' + performance.now()
  }
})

import './js/app'
it's called amok.js in the root and then i have this in an npm script
amok -b chrome -t -w . -c watchify amok.js -- -t babelify"
Ok, I can highly recommend mithril ;) http://mithril.js.org
Jigar Gosar
@jigargosar
will give it a shot. thanks. I am currently using jquery to figure out how template is rendered, and based on that I position dynamic elements on top of it. these dynamic components participate is complicated drag and drop process, for which I am using jquery.draggable etc.
usually with vdom, you don't get any of this. :(
Rasmus Porsager
@porsager
ah, ok.. it's fairly easy to plug other libraries in mithril for that
I did a test using dragula (vanilla js drag drop library) and mithril which seemed to work fine
Jigar Gosar
@jigargosar
thats good news.
Rasmus Porsager
@porsager
Jigar Gosar
@jigargosar
also, I don't like mutable state. no getter setters for me.
Rasmus Porsager
@porsager
I think mithril should work even better for you then ;)
Jigar Gosar
@jigargosar
awesome, BTW the example is great.
also liking mithril already, for its simplicity.
I love simple things in life.
Rasmus Porsager
@porsager
Cool! You should head over to https://gitter.im/lhorie/mithril.js for more inspiration then ;)
Jigar Gosar
@jigargosar
tools that try to solve one specific problem, and if there is a kitchen sink like jquery, I write wrappers over it, to split the api.
Rasmus Porsager
@porsager
Yeah..
M. Yetatore
@yetatore
Hi! I'm joining this room with hope that this project is still alive :)
In my spare time I'm working/researching about "instant feedback" in web development.
We know that JavaScript is capable to support this in a development environment, so, I love to see a project motivated to achieve that.
M. Yetatore
@yetatore
Amok is platform dependent? Because I can't use it under linux.
I'll make a bug report with the exception that raises.
Oh, another thing... amokjs.com is down. Maybe it would be a good idea removing the references to it? Because searching for information I get to an death end many times.
Casper Beyer
@caspervonb
Will renew the domain soon
And it should work just fine on Linux :)
M. Yetatore
@yetatore
Cool! I'm glad to start working in this project ;)
Josh Duff
@TehShrike
@caspervonb have you ever considered releasing rdbg + hotreload as its own module? I have my own build/autoreload script already, but I would love to be able to drop in your hotreload solution in place of triggering a LiveReload server
Casper Beyer
@caspervonb
@TehShrike Hmm, source? :P
Just to grok the use case
build/server etc is optional, amok can serve just as a browser 'opener' with hotreload
v2 (http://github.com/codajs/coda) is more modular (and not usable at all currently, don't even bother installing it :P )
Josh Duff
@TehShrike
@caspervonb yeah, I read the source, and it was a bit tied into the rest of the amok framework to be very easy to use on its own
I imagine if I studied it long enough I could figure out how to rewrite it, but I do love reusing other people's already-working libraries :-)
Casper Beyer
@caspervonb
I'll take it into consideration if coda-hotpatch can be made standalone'ish ;)
Casper Beyer
@caspervonb
If it does, then it means no runtime launching
Truly seperate concerns, just optionally creates its own connection if none is provided. Allowing it to act as a standalone executable, or plugin.
Casper Beyer
@caspervonb
@TehShrike The leanest I can do is something like coda-hotpatch.start({ port: 9222 })
Yet to push but these are basically dual purpose modules.. the default export is a plugin entry point, everything else is "useful" code relating to that domain
Josh Duff
@TehShrike
What interface does that return? I haven't read every line of code in coda yet but I imagine I'd need two things: the hotpatching code that I inject into the client that connects to the server, and the server with a hotpatchCodeOnClient(javascriptCode) method
Casper Beyer
@caspervonb
There is no server tho ;)
Remember that the browser is the server
Josh Duff
@TehShrike
aah
Casper Beyer
@caspervonb
Just returns the rdbgp.Client (same as rdbgp really, just that its a duplex stream instead)