These are chat archives for canjs/canjs

23rd
Apr 2018
Chasen Le Hara
@chasenlehara
Apr 23 2018 16:19
@evgeniy-klemin I don’t think there’s a way to basically “undo” a can.Component.extend once the code’s been included… am I understanding you correctly? What’s your use case?
@dbleier Yeah, I would expect presentation.slideshows to be a DefineList, depending on what the rest of your code looks like. Here’s a demo (open your browser’s console and then click Run with JS in the Output pane): https://jsbin.com/gefeketata/2/edit?js,output
Dovid Bleier
@dbleier
Apr 23 2018 17:18
@chasenlehara thanks for the demo, except that is expecting slideshows as a predefined property on the object. I am currently adding it on the fly. Presentation is currently a generic DefineMap not its own extended object
Chasen Le Hara
@chasenlehara
Apr 23 2018 17:31
@dbleier It doesn’t have to be: https://jsbin.com/jekoduxiha/2/edit?js,output
Can you make a JS Bin that duplicates the issue you’re seeing?
Justin Meyer
@justinbmeyer
Apr 23 2018 18:56
I think some people were seeing errors in CanJS 4 about an attribute being set to something invalid
I just fixed that in can-stache 4.3.2
Dovid Bleier
@dbleier
Apr 23 2018 19:15
@chasenlehara https://jsbin.com/lilozoroxa/edit?js,console,output - in jsbin it seems to work
but in my unit test, slideshows is a POJO array, not a DefineList
Dovid Bleier
@dbleier
Apr 23 2018 19:25
@justinbmeyer thanks
Roman Ambroselli
@r0m4n
Apr 23 2018 22:53
Hey guys, on canjs v1, I have a project that precompiled all ejs into a single .js file to be consumed in in production with can-compile (with a preload caching function). I see that the can-compute project was maintained up to v2 but it doesn't work with v3 and up. Is there something similar that I should look at to work with my v3 project or is it functionally deprecated along with ejs? Is there something like that could be supported with the newer templating?
Chasen Le Hara
@chasenlehara
Apr 23 2018 23:10
@r0m4n I’m not aware of a quick replacement—I think steal, webpack, etc. have mostly replaced the need for can-compile.
@justinbmeyer might be able to give some tips that we can add to our migration guide :)
Roman Ambroselli
@r0m4n
Apr 23 2018 23:19
ok thanks @chasenlehara yea that's what I was thinking. I couldn't tell if there was any magic built into the caching of these templates when you run can.EJS() after loading the can-compile bundle that makes it better than just using any old bundler. I'll have to experiment with what's out there w/ webpack and steal