by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 29 19:08
    cherifGsoul labeled #5479
  • May 28 17:07
  • May 26 18:19
    cherifGsoul opened #5492
  • May 23 05:53
    bmomberger-bitovi labeled #5491
  • May 23 05:53
    bmomberger-bitovi opened #5491
  • May 22 20:50
    greenkeeper[bot] commented #5489
  • May 22 20:50

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

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

  • May 21 20:25
    mikemitchel commented #5490
  • May 21 20:25
    mikemitchel labeled #5490
  • May 21 20:25
    mikemitchel opened #5490
  • May 19 22:21
    greenkeeper[bot] labeled #5489
  • May 19 22:21
    greenkeeper[bot] opened #5489
  • May 19 22:21

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

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

  • May 18 18:40
    greenkeeper[bot] commented #5469
  • May 18 18:40

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • May 17 22:31
    greenkeeper[bot] commented #5469
  • May 17 22:31

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • May 16 19:16

    greenkeeper[bot] on kefir-3.8.7

    chore(package): update kefir to… (compare)

  • May 15 16:30
    cherifGsoul synchronize #5488
  • May 15 16:30

    cherifGsoul on version-and-release-integration

    remove the github token (compare)

Gira Minus
@gKreator
Im pretty sure every variable in js is a reference
Frank Lemanschik
@frank-dspeed
@gsmeets good question i like it the answer is more complex then you think :) it depends on your code if gc cleans up or not most efficent way is to never let gc happen!
so if you want to clean up a var let do it from hand.
Its one of my core principals to never let gc even run !
a realy good example for a never cleaned Var or Let in CanJS is when you create streams where you never listen too :)
Gira Minus
@gKreator
Anyone have experience with merging multiple api ajax calls into one?
Frank Lemanschik
@frank-dspeed
@gKreator in general yes but it depends a bit on your use case

Not possible in most cases

Each ajax call involves the browser sending information to a server at a particular URL.

If you reduced the browser code from two ajax calls to one ajax call, the server would receive less information, the browser would not receive some information it is getting now, and/or the server would perform fewer operations.

If you control the server code, you might be able to change the server code to be able to do both operations in one step. Only then could you change the browser code.

for example to combine database querys i am as couchbase user :) can do simply chain querys and fire one big query
that returns multible results so i can reduce my ajax requests always to 1
but if you talk about for example ajax requests to json endpoints you cant merge them you can only wait till both promises are done
Conclusion merging requests client side is not possible by the coder :)
but http2 is merging such requests on protocol network layer
i am so happy when http2 is full standart then all this bundling packaging caching brings nothing anymore and we have much better applications :)
DaveO
@DaveO-Home

Issues with upgrade from Canjs 3.4.0 to Canjs 3.4.1:

  1. can/control - I have node_modules/can installed ("can": "^3.4.0",).
    steal("can/control"..., function(Control...) {

     Control.extend(...  <=====failed with "not a function" error.

    }

    Added "can-control": "*", to package and changed steal to;
    steal("can-control"..., function(Control...) {

     Control.extend <==== worked

    }

    Question, does the proper configuration for canjs require the individual modules in package.json? I find it convenient to just configure "can".

  2. Steal-tools: application is using the Steal-CSS extension,
    steal.import("node_modules/font-awesome/css/font-awesome.min.css"); Note: the app will build properly.
    Building with steal-tools javascript;

    !/usr/bin/env node

    var stealTools = require("steal-tools");
    //
    var promise = stealTools.build({ .....

Stack trace repeated for each css file import....

Potentially unhandled rejection [58] Error: Error loading "components/font-awesome/css/font-awesome.min.css!steal-css@1.2.1#css" at file:/home/daveo/NetBeans/Resume/web/components/font-awesome/css/font-awesome.min.css
Unable to load CSS in an environment without a document.
at getDocument (file:/home/daveo/NetBeans/Resume/web/node_modules/steal-css/css.js:36:8)
at load.metadata.execute (file:/home/daveo/NetBeans/Resume/web/node_modules/steal-css/css.js:224:7)
at linkDynamicModule (/home/daveo/NetBeans/Resume/node_modules/steal-systemjs/dist/system.src.js:743:32)
at link (/home/daveo/NetBeans/Resume/node_modules/steal-systemjs/dist/system.src.js:602:11)
at Object.execute (/home/daveo/NetBeans/Resume/node_modules/steal-systemjs/dist/system.src.js:934:11)
at doDynamicExecute (/home/daveo/NetBeans/Resume/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1969:25)
at link (/home/daveo/NetBeans/Resume/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:2017:24)
at doLink (/home/daveo/NetBeans/Resume/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1791:7)
at updateLinkSetOnLoad (/home/daveo/NetBeans/Resume/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1839:18)
at /home/daveo/NetBeans/Resume/node_modules/steal-es6-module-loader/dist/es6-module-loader.src.js:1645:11

Gira Minus
@gKreator
#1 its best to use them individually
DaveO
@DaveO-Home
Ok, but all of the other "can/" modules are working properly.
Gira Minus
@gKreator
Yeah it should all work
Its just kinda preferred to only load what is needed
Did u try to delete ur node_modules folder and reinstall?
DaveO
@DaveO-Home
steal-tools selects only what is used for production, I think?
Actually that is what I eventually did to get things working again, the the Control.extend issue remain.
Gira Minus
@gKreator
So #2 is working?
DaveO
@DaveO-Home
Not without my change to the individual module can-control.
Gira Minus
@gKreator
One sec let me get to my pc

did you try

steal("can/control/"

?
DaveO
@DaveO-Home
Will try...
Got this: TypeError: Error loading "resume@0.0.3#appl/js/index" at http://localhost:8080/resume/appl/js/index.js
Control.extend is not a function
Stack trace:
anonymous/<@http://localhost:8080/resume/appl/js/utils/basecontrol.js:11:20
steal/stealInstantiateResult.execute@http://localhost:8080/resume/node_modules/steal/steal.js:5707:24
linkDynamicModule@http://localhost:8080/resume/node_modules/steal/steal.js:3659:18
linkDynamicModule@http://localhost:8080/resume/node_modules/steal/steal.js:3653:11
linkDynamicModule@http://localhost:8080/resume/node_modules/steal/steal.js:3653:11
linkDynamicModule@http://localhost:8080/resume/node_modules/steal/steal.js:3653:11
link@http://localhost:8080/resume/node_modules/steal/steal.js:3518:11
register/loader.instantiate/</<.execute@http://localhost:8080/resume/node_modules/steal/steal.js:3850:11
doDynamicExecute@http://localhost:8080/resume/node_modules/steal/steal.js:1969:20
link@http://localhost:8080/resume/node_modules/steal/steal.js:2017:24
doLink@http://localhost:8080/resume/node_modules/steal/steal.js:1791:7
Gira Minus
@gKreator
can you do a console.log( Control );
before Control.extend
DaveO
@DaveO-Home
Sure...
DaveO
@DaveO-Home
Control=[object Object] basecontrol.js:10:1
Control.extend=undefined
Gira Minus
@gKreator
weird..
how do you require in component?
or route
DaveO
@DaveO-Home
I use require("package.json!npm");
Gira Minus
@gKreator
then you have can.Component?
DaveO
@DaveO-Home
Yes
Gira Minus
@gKreator
but can.Control does not work?
DaveO
@DaveO-Home
let me check on component
I don't explicitly use can.component
Gira Minus
@gKreator
Umm want to send me your source code? It would help me debug this allot quicker.
DaveO
@DaveO-Home
Here's the steal... steal("app",
"alert",
"helpers",
"underscorestring",
"can/control",
"can/map/define",
"can/construct/super",
function (App, Alert, Helpers, S, Control) {
_.mixin(S.exports());
console.log("Control="+Control);
console.log("Control.extend="+Control.extend);
return Control.extend({
init: function (element, options) {
this._super(element, options);
}
Gira Minus
@gKreator
run
console.log(Control);
instead of
console.log("Control="+Control);
so you can actually see the object itself rather then the typeof
also try
can.Control.extend
rather then Control.extend
DaveO
@DaveO-Home
Actually I did run console.dir but couldn't do a select all