These are chat archives for canjs/canjs

18th
Jan 2018
Justin Meyer
@justinbmeyer
Jan 18 2018 02:42
@kaderiho you could pass a callback function down
Runn Vermel
@runn-vermel
Jan 18 2018 18:47
Hi guys - i'm wondering if there's an easy way to turn off the 100s of warnings i'm getting in my aging app?
Matthew Phillips
@matthewp
Jan 18 2018 18:48
what are the warnings about?
Runn Vermel
@runn-vermel
Jan 18 2018 18:53
for example: %index is deprecated. Use scope.index instead.
"keyColumn" is not in the current scope, so it is being read from the parent scope.
This will not happen automatically in an upcoming release. See https://canjs.com/doc/can-stache.scopeAndContext.html#PreventingScopeWalking.
i want to put as little time into this app, as we are building a new one, so, just turning off the warnings would be ideally
@matthewp ^
Matthew Phillips
@matthewp
Jan 18 2018 18:55
I think you can import can-log and set log.logLevel = 99
Runn Vermel
@runn-vermel
Jan 18 2018 18:55
so, i'm totally lost in the canjs world - i didn't write this app - import it where, and what does that do? sorry, newbie..
Matthew Phillips
@matthewp
Jan 18 2018 18:58
in your main js file most likely
will cause it not to log stuff
so something like require("can-log").logLevel = 99
sets it a high enough level that nothing will get logged
Runn Vermel
@runn-vermel
Jan 18 2018 19:02
ok, i don't have require, but i do have import. having said that, i think i need to add it as an NPM package, because when i typed this:
import CanLog from "can-log";
CanLog.logLevel = 99;
i got :smile: "Error: Error loading "can-log" at http://localhost:8080/can-log.js
Error loading "can-log" from "fixtures/index" at http://localhost:8080/fixtures/index.js
Could not load 'can-log'
Is this an npm module not saved in your package.json?"
not sure where that smile came from, but hey :)
Matthew Phillips
@matthewp
Jan 18 2018 19:03
yeah, add it
Runn Vermel
@runn-vermel
Jan 18 2018 19:05
awesome that works! thanks!
can i ask another question?
this one has to do with debounce - i'm trying to filter a list, which probably has about 5000 entries in it - i'd love to have a debouncer on my filter, so it only runs if 500milliseconds have passed since the user stopped typing.
but.. i have no idea what to do with it
Matthew Phillips
@matthewp
Jan 18 2018 19:26
doesn't lodash have a debounce method?
Runn Vermel
@runn-vermel
Jan 18 2018 19:48
not sure - does canJS not have one?
Gregg Roemhildt
@roemhildtg
Jan 18 2018 21:00
I'm looking into getting feathers-auth with jwt to work with done-ssr. From what I can see, I need some shared state between done-ssr and the client app. Is this what can-zone-storage is for?
Matthew Phillips
@matthewp
Jan 18 2018 21:01
@runn-vermel, no it doesn't have a debounce method, sort of outside of it's purpose
Runn Vermel
@runn-vermel
Jan 18 2018 21:01
@matthewp - thank you for all your help!
Matthew Phillips
@matthewp
Jan 18 2018 21:02
np
Runn Vermel
@runn-vermel
Jan 18 2018 21:02
i'll probably jump back on here ina few days -we are seeing weird testing fails, but.. one thing at a time. thanks again!
Matthew Phillips
@matthewp
Jan 18 2018 21:02
@roemhildtg have you looked at the bitcentive app? it uses features with jwt i believe: https://github.com/donejs/bitcentive/blob/staging/public/models/session.js
Gregg Roemhildt
@roemhildtg
Jan 18 2018 21:05
I hadn't looked at that one yet. Will do
Matthew Phillips
@matthewp
Jan 18 2018 21:17
Anyone want to update the canjs guides to use import/export instead of require()? We are looking for contributions
Gregg Roemhildt
@roemhildtg
Jan 18 2018 21:46
I could take a stab at a good regex to do it. I've been practicing on those and they are quite amazing.
Matthew Phillips
@matthewp
Jan 18 2018 21:49
:+1:
just within canjs/canjs
Gregg Roemhildt
@roemhildtg
Jan 18 2018 22:16
Are there any exports in demos? I don't see any
Kevin Phillips
@phillipskevin
Jan 18 2018 22:23
probably not
Gregg Roemhildt
@roemhildtg
Jan 18 2018 22:23
Hows this? https://github.com/canjs/canjs/compare/master...roemhildtg:update-docs-import-export?expand=1
It looks good at a quick glance...but it probably should review a little more thoroughly
Kevin Phillips
@phillipskevin
Jan 18 2018 22:24
$ grep -rlF module.exports docs
docs/can-canjs/can-infrastructure.md
docs/can-canjs/can-namespace.md
docs/can-guides/introduction/technical.md
docs/can-guides/commitment/recipes/todomvc-with-steal/16-clear-all-completed/todo.js
docs/can-guides/commitment/recipes/todomvc-with-steal/13-component-create/todo-create.js
docs/can-guides/commitment/recipes/todomvc-with-steal/7-algebra/todo.js
docs/can-guides/commitment/recipes/todomvc-with-steal/2-define-todo/todo.js
docs/can-guides/commitment/recipes/todomvc-with-steal/14-component-edit/todo-list.js
docs/can-guides/commitment/recipes/todomvc-with-steal/9-connection/todo.js
docs/can-guides/commitment/recipes/todomvc-with-steal/8-fixtures/todos-fixture.js
docs/can-guides/commitment/recipes/todomvc-with-steal/15-setter-toggle/todo.js
docs/can-guides/commitment/recipes/todomvc-with-steal/3-define-todo-list/todo.js
docs/can-guides/contribute/making-a-new-package.md
docs/can-guides/experiment/debugging/debugging.md
go ahead and submit the PR and we can get a few people to review it
also... not sure if you've checked out Landscaper, but if you could put together a gist that can be ran through Landscaper it would be a lot easier to update the other can-* packages
Gregg Roemhildt
@roemhildtg
Jan 18 2018 22:27
module.exports = something should be export default something, right?
Kevin Phillips
@phillipskevin
Jan 18 2018 22:27
yep
also, thanks for doing this. it's very awesome.
Gregg Roemhildt
@roemhildtg
Jan 18 2018 22:45
no problem. I'm always looking for a practical way to practice regex
Justin Meyer
@justinbmeyer
Jan 18 2018 23:16
@Lighttree what went wrong with url-behavior
One thing you could do is separate out a function that takes the params/set passed to getList and return what's passed to can-ajax