These are chat archives for canjs/canjs

6th
May 2017
Gira Minus
@gKreator
May 06 2017 03:28
Is there any way of knowing inside the app, if you are running in production mode with stealjs?
Gira Minus
@gKreator
May 06 2017 05:07
image.png
how come that tag autocloses
Gira Minus
@gKreator
May 06 2017 05:21
danced around it
image.png
Brad Momberger
@bmomberger-bitovi
May 06 2017 13:20
You can check the value of System.env (or steal.System.env, same thing) -- it will be "window-production" for a browser, and "production" on the server.
Brad Momberger
@bmomberger-bitovi
May 06 2017 14:01
Stache can't do that sort of {{#if something}}<div>{{/if}} ... {{#if something}}</div>{{/if}} because it doesn't generate HTML text as output. It renders directly to DOM fragments of elements, so Stache sections like an if block have to be complete DOM fragments themselves.
The CSS solution is probably better overall. Another possibility is to define that block as a partial, and do:
{{#if tv_mode}}
   <div class="row"> 
      <div class="col-xs-12 col-sm-6 col-md-4">
        {{> my_partial}}
      </div>
   </div>
{{else}}
   {{> my_partial}}
{{/if}}
Brad Momberger
@bmomberger-bitovi
May 06 2017 14:07
Gira Minus
@gKreator
May 06 2017 16:25
Thanks for the tips. I tried the partial route earlier and I then decided to go with the class toggling.
Gira Minus
@gKreator
May 06 2017 16:53
Is CanJs using vdom on the front end? I know it uses it for nodejs
morrme
@morrme
May 06 2017 20:23
random unrelated question--do any of you go to the local (chicago) bitovi events?
Gira Minus
@gKreator
May 06 2017 20:23
I know some do.. I was going to go to one but got too busy with work and such
morrme
@morrme
May 06 2017 20:25
@gKreator ah. I hope to get to go to one soon.
Brad Momberger
@bmomberger-bitovi
May 06 2017 21:37
I think SSR is the only place where vdom is used outside of a test.
Gira Minus
@gKreator
May 06 2017 21:38
how is canjs so fast then?
Brad Momberger
@bmomberger-bitovi
May 06 2017 21:38
Justin is a performance junkie.
Gira Minus
@gKreator
May 06 2017 21:39
Well I thank you guys for it all
image.png
Brad Momberger
@bmomberger-bitovi
May 06 2017 21:39
That's looking pretty good @gKreator . Are you using donejs-electron there?
Gira Minus
@gKreator
May 06 2017 21:40
Nope, but I am using steal-electron
This is technically the bitballs pattern at its core, with steal-electron
Brad Momberger
@bmomberger-bitovi
May 06 2017 21:41
Oh cool
Gira Minus
@gKreator
May 06 2017 21:42
I am using steal-socket.io and the dashboard is auto synced between all online parties.
This has been a pretty smooth project with all the help from you guys