<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 4, 2013 at 1:54 PM, Manuel Quiñones <span dir="ltr"><<a href="mailto:manuq@laptop.org" target="_blank">manuq@laptop.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">2013/11/4 Code <<a href="mailto:iraguet@activitycentral.com">iraguet@activitycentral.com</a>>:<br>

<div class="im">> I think this is off-topic...<br>
> BTW: perhaps you wanna see this thread from RequireJS' list where James<br>
> Burke (core developer of RequireJS lib) talks about these syntax forms.<br>
> If there is something realted to this to add, would u open a new thread,<br>
> please?<br>
><br>
><br>
> Getting back to the former topic (loading non-AMD modules):<br>
> There is another approach, require.config() calls are additive, so it is<br>
> possible to call config from other file than loader.js and require merges<br>
> it.<br>
><br>
> example of a require.config() from activity.js:<br>
> <a href="https://gist.github.com/code-sur/7305059" target="_blank">https://gist.github.com/code-sur/7305059</a>  ...loader.js stills as it is in<br>
> sugar-web-template<br>
><br>
> pros:<br>
> * no need to modify loader.js<br>
> * some developers would set other requirejs options<br>
><br>
> cons:<br>
> * whole config may spreads among many files<br>
><br>
> The last "con" may be a "pro" if you want to clearly separete the framework<br>
> config from the activity specific config<br>
<br>
</div>Yeah.  I think it is up to the activity developer to choose one or the<br>
other.  The shim looks more prominent in RequireJS docs.<br>
<br>
Here is how I used the shim in Gears activity, just for reference:<br>
<a href="https://github.com/manuq/gears-activity/blob/master/js/loader.js" target="_blank">https://github.com/manuq/gears-activity/blob/master/js/loader.js</a><br>
<br>
By the way, I have talked with the developer of the lib involved,<br>
gearsketch, and he is happy if I provide a patch to make his code an<br>
AMD module.  In general I think its good to do this.<br></blockquote><div>+1</div><div>I think that this is the right path, too, but I'm thinking from the point of view of an occasional activity developer how just wants to build-up an activity with his/her daily web tools.</div>
<div>I want to ease the work of activity devs... if it is somewhat hard to do, they won't build anything.</div><div><br></div><div><br></div><div>I'd like to write a very tiny paragraph at the doc under the title of "Using other JavaScript libraries" that tells you where to put the shim config if you have any non-AMD module.</div>
<div>Seems weird to ask for putting shim config at loader.js and a few lines above in the doc says that you shouldn't touch that file.</div><div><br></div><div>Code</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<span class=""><font color="#888888"><br>
--<br>
.. manuq ..<br>
</font></span></blockquote></div><br></div></div>