These are chat archives for canjs/canjs

28th
Oct 2016
Frank Lemanschik
@frank-dspeed
Oct 28 2016 12:20
@justinbmeyer i have a more complex question why does donejs relay on can map when canjs repo tells that this is legacy
Kevin Phillips
@phillipskevin
Oct 28 2016 12:23
@frank-dspeed the donejs generators haven't been updated to use DefineMap and the rest of CanJS 3.0
Frank Lemanschik
@frank-dspeed
Oct 28 2016 12:24
Ah good good i hope justin soon says yes to my proposal on the cli then i can update the generator :smile:
no i need to wait there is some blocking stuff in using donejs at present that needs to be solved over donejs / donejs-cli / generator-donejs
at present i use my own generator :D
Kevin Phillips
@phillipskevin
Oct 28 2016 12:26
Yeah I've seen some of the issues around that
Frank Lemanschik
@frank-dspeed
Oct 28 2016 12:26
ya it will simply make all life better to have a single generator and let it install all version combinations
but still let the donejs cmd functionality exist and drop the local to the project installed cli
we simply should locate templates versioned under generator-donejs/versions/v1.xx /v2.xxx and so on with the package definitions
Juan Orozco
@Macrofig
Oct 28 2016 16:07
In CanJS 2.3's define plugin, I was told not to rely on using define for type coercion... but can't remember why we shouldn't. Or maybe it was only for specific types (like Date which isn't really a type like boolean or number, I suppose). Does anyone have any thoughts on that? I'm probably misremembering a conversation.
Hrm... So, maybe it is a consistency thing. If a property had "false" define would translate that to false but Boolean("false") is actually true.
Matthew Phillips
@matthewp
Oct 28 2016 19:34
Yeah, not familiar with that
Or why that would be
string "false" is probably meant for deserializing urls maybe?
Thomas Sieverding
@Bajix
Oct 28 2016 19:35
@Macrofig There’s htmlbool which is special
Matthew Phillips
@matthewp
Oct 28 2016 19:36
ah
Thomas Sieverding
@Bajix
Oct 28 2016 19:36
Also ‘date’ which always makes new instances
Those are the only edge cases
Frank Lemanschik
@frank-dspeed
Oct 28 2016 20:32
date don't makes always a new instance if you create a date or moment object with a value and assign it to a const or var it should get reused
its not my opinion its only what the NodeJS Profiler tells me :)