Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 18 22:20
    greenkeeper[bot] labeled #5391
  • Oct 18 22:20
    greenkeeper[bot] opened #5391
  • Oct 18 22:20

    greenkeeper[bot] on can-observable-mixin-1.0.3

    fix(package): update can-observ… (compare)

  • Oct 18 19:08
    cherifGsoul labeled #5390
  • Oct 18 19:07
    cherifGsoul opened #5390
  • Oct 18 18:45
    greenkeeper[bot] labeled #5389
  • Oct 18 18:45
    greenkeeper[bot] opened #5389
  • Oct 18 18:45

    greenkeeper[bot] on can-observable-bindings-1.3.0

    fix(package): update can-observ… (compare)

  • Oct 18 18:29

    matthewp on master

    Update dist for release (compare)

  • Oct 18 18:29

    matthewp on v6.1.3

    Update dist for release 6.1.3 (compare)

  • Oct 18 17:59

    matthewp on can-observable-array-1.0.2

    (compare)

  • Oct 18 17:59

    matthewp on master

    fix(package): update can-observ… Merge pull request #5388 from c… (compare)

  • Oct 18 17:59
    matthewp closed #5388
  • Oct 18 16:46
    greenkeeper[bot] labeled #5388
  • Oct 18 16:46
    greenkeeper[bot] opened #5388
  • Oct 18 16:46

    greenkeeper[bot] on can-observable-array-1.0.2

    fix(package): update can-observ… (compare)

  • Oct 18 12:45
    greenkeeper[bot] labeled #5387
  • Oct 18 12:45
    greenkeeper[bot] opened #5387
  • Oct 18 12:45

    greenkeeper[bot] on can-stache-element-1.0.2

    fix(package): update can-stache… (compare)

  • Oct 18 09:49
    chasenlehara edited #5384
Andrei Balmus
@abalmush
I will take a look how to override it
Andrei Balmus
@abalmush

Hi guys I updated “can" from 2.2.9 to 2.3.10 and now when I run gulp I’m getting this error:

node_modules/can/dist/cjs/map/define/define.js Line 15: Illegal return statement
You may need an appropriate loader to handle this file type.
| require('../../compute/compute.js');
| if (can.define) {
|     return;
| }
| var define = can.define = {};
 @ ./~/can/dist/cjs/can.js 13:0-33

is it something that I can fix? i’m using webpack, please help.

Matthew Phillips
@matthewp
@abalmush looks like a webpack issue: webpack/webpack#67
Andrei Balmus
@abalmush
thank you @matthewp, I will try to update webpack maybe this fix my problem
Alex
@whitecolor
@abalmush update it to stealJs)
Andrei Balmus
@abalmush
Hi @whitecolor, do you think it will be easy to move to gulp + StealJS from web pack ? It is a very old and big project, theer is a lot of tests and so on, I worry if I will need to fix a lot of stuff, but any way I will try on my local environment
Alex
@whitecolor

@abalmush Well actually you should estimate what wong with webpack. I think web pack is great, I just don't like how it works with hot reloading, as it creates bundles on server and repacks it every time, with steal/systemjs I got much faster results replacing only sources changed.

There are some questions to steal - about assets bundling (bunding other types then js/css, hash-busting, etc). But it has good bundles (chunks) optimization mechanics out of the box, though in webpack you can tweak it too.

Guido Smeets
@gsmeets
One of canjs' strengths is that it allows developer freedom in making choices wrt tooling.
And those of us that use can from before the donejs era aren't simply going to change toolchain overnight.
DoneJS contributor meeting
Guido Smeets
@gsmeets
Your meeting starts just when I'm eating dinner every time :/
Matthew Phillips
@matthewp
@whitecolor Steal does asset bundling now, see "bundleAssets" option: http://stealjs.com/docs/steal-tools.BuildOptions.html
Jan Jorgensen
@ramblinjan
If I'm doing ($specialevent)="doSomething()" is there a way to just hand off the default arguments for the event handler rather than specifying individual arguments?
Jan Jorgensen
@ramblinjan
looking at can/view/bindings, looks like the answer is no
Alex
@whitecolor
@matthewp what about adding hashes to names?
that's show the bug the console.log's should be in the opposite order
cc @daffl
Dovid Bleier
@dbleier
is there a component event similar to "inserted" that is fired when an update is made to the stache template?
Mohamed Cherif Bouchelaghem
@cherifGsoul
@dbleier you mean DOM event?
Dovid Bleier
@dbleier
@cherifGsoul I guess it would be a DOM event. It doesn't really matter. I just need a hook to know when the template has been updated so I can rebind my jquery plugin to the updated content.
Alex
@whitecolor
@dbleier what do you mean updated? why would need to rebind the plugin?
Mohamed Cherif Bouchelaghem
@cherifGsoul
@dbleier you can put your custom events in the events object for the component:
can.Component.extend({
tag:'x-el',
template:aTpl,
events:{
'li click':function(){
// handle it
}
}
});
Mohamed Cherif Bouchelaghem
@cherifGsoul
@dbleier can you give an example for your use case?
Jeroen Cornelissen
@jeroencornelissen
How do can.Components cope with screenreaders? Do you guys take accessibility into account?
We are creating a new menu for our webapp and I want to make it accessible for all users.
Dovid Bleier
@dbleier
@cherifGsoul, @whitecolor the custom events are usually user triggered events. I need to know when the template has finished updating itself. The use case is this: I have a div containing a series of divs. I bind a jquery plugin called cylce2 to the parent div which cycles through the children divs (containing img or video) in a slideshow. When the viewModel id is changed (via scheduling) it updates the template with all new content, including new content for that div, which then crashes cycle2. So when the viewModel id is updated, I want to remove the plugin (can-define) and once the content is done updating, reattach the plugin. I just don't know how to know when the template is finished updating. Basically I need an event like "inserted" called "updated". Make sense?
Mohamed Cherif Bouchelaghem
@cherifGsoul
@dbleier why you need to disable define plugin?
Alex
@whitecolor
@dbleier I'd better to create custom element something my-cycle2 which will handle erythinkng (jquery plugin lifecycle) within itself, when the id of doc is changed it can either handl this update inside or be replaced with new instance
{{#doc}}<my-cycle {doc}=doc/>{{/doc}}
Mohamed Cherif Bouchelaghem
@cherifGsoul
Im writing a jsbin example for better understanding
Mohamed Cherif Bouchelaghem
@cherifGsoul
@dbleier here is a basic example with cycle2 http://jsbin.com/qejilo/4/edit?html,css,js,output you can clone it and explain your problem
Adam Tourkow
@atourkow
I have component I want to update via ajax based on a timer. Should, I just build a function into the component called updateStuff: function() { doAjaxStuff ... } and just call updateStuff()?
Mason Shin
@minsooshin
I have a small question about model
what is recommended between callback and promise for success and error?
for instance, if I have a model with Todo
Todo.findAll({}, success, error) or Todo.findAll({}).then()?
Kevin Phillips
@phillipskevin
@atourkow when you say a timer, you mean it’s going to do a setTimeout and update every few seconds or something?
Adam Tourkow
@atourkow
@phillipskevin Yeah. But, I also would like to apply ajax to something like a search. FWIW, it's not a SPA app, but just a section of the page.
Kevin Phillips
@phillipskevin
so, something like… every 5 seconds make an ajax call and update your viewModel based on the response?
Adam Tourkow
@atourkow
@phillipskevin yep. The search and timer are separate things.
I think what's confusing me, is the fact that there's "can.model" which is for like REST api calls. Should I be putting the ajax calls in the model or in the ViewModel?
Kevin Phillips
@phillipskevin
usually, the ViewModel would call the model
and the model would be responsible for the ajax stuff
Adam Tourkow
@atourkow
So, like in the viewmodel is a function called updateStuff that calls the model?
Kevin Phillips
@phillipskevin
the most basic way is to use the model to initialize your viewmodel
so you have a property on your viewModel that represents whatever data is returned by the Model
in that example, the players property ends up being a promise
Another nice way to do it is to have two separate properties - one for the promise and one for the data