Hi Justin,
You said that "shim is a much better way of doing it because it sets up the dependency for every page using steal." But if I create a file XXX using depreciated 'then' with dependency 'A' and if I steal the file XXX I will steal the dependency A too. So this is the same and I do not need to configure the second file 'stealconfig.js' , isn't it ?
Does this code ensure that the function will be run after and only after the dependencies ('jquery','can', 'can/construct/super', './core.js') are finished?
Does this code above mean, that the first will be loaded 'jquery', the second will be loaded 'can/construct/super', the third './core.js' and only
after that the "function", or all dependencies will be loaded in unpredictable order ?
Loading:
'core.js' file:
You said that "shim is a much better way of doing it because it sets up the dependency for every page using steal." But if I create a file XXX using depreciated 'then' with dependency 'A' and if I steal the file XXX I will steal the dependency A too. So this is the same and I do not need to configure the second file 'stealconfig.js' , isn't it ?
Does this code ensure that the function will be run after and only after the dependencies ('jquery','can', 'can/construct/super', './core.js') are finished?
- steal( 'jquery', 'can', 'can/construct/super', './core.js', function($, can, core){
- //some code...
- });
Does this code above mean, that the first will be loaded 'jquery', the second will be loaded 'can/construct/super', the third './core.js' and only
after that the "function", or all dependencies will be loaded in unpredictable order ?
Loading:
- 'jquery' --> 'can' --> 'can/construct/super ' --> './core.js' --> 'function '
- ( 'jquery' + 'can' + 'can/construct/super' + './core.js' ) --> 'function'
'core.js' file:
'todos.js' file:
- steal('jquery', 'can', 'can/construct/super', function($, can){
- //some code...
- });
is this the same?
- steal( './core.js', function(core){
- //some code...
- });
- steal('jquery', 'core', function($, core){});
- steal('jquery', 'core').then( function(){});