Message from discussion
Syntactic sugar to define dependencies
Received: by 10.52.240.229 with SMTP id wd5mr6729600vdc.8.1342783479449;
Fri, 20 Jul 2012 04:24:39 -0700 (PDT)
X-BeenThere: requirejs@googlegroups.com
Received: by 10.220.240.15 with SMTP id ky15ls2613465vcb.6.gmail; Fri, 20 Jul
2012 04:24:38 -0700 (PDT)
Received: by 10.52.97.102 with SMTP id dz6mr581580vdb.2.1342783478468;
Fri, 20 Jul 2012 04:24:38 -0700 (PDT)
Date: Fri, 20 Jul 2012 04:24:38 -0700 (PDT)
From: "dev.pus" <developement....@googlemail.com>
To: requirejs@googlegroups.com
Message-Id: <2b45cc95-1639-47a8-aa6a-dbc7ece646b5@googlegroups.com>
In-Reply-To: <CC2EB773.1159B%listas@millermedeiros.com>
References: <d62c29c5-6f11-4bd8-bc98-de909ca0be4b@googlegroups.com>
<CC2EB773.1159B%listas@millermedeiros.com>
Subject: Re: [requirejs] Syntactic sugar to define dependencies
MIME-Version: 1.0
Content-Type: multipart/mixed;
boundary="----=_Part_179_27267254.1342783478181"
------=_Part_179_27267254.1342783478181
Content-Type: multipart/alternative;
boundary="----=_Part_180_27870871.1342783478181"
------=_Part_180_27870871.1342783478181
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Hi,
the result looks like:
define(function(require, module, exports) {
var Backbone = require('backbone')
, MainIndexView = require('views/main/index')
, Router
;
Router = Backbone.Router.extend({
routes: {
"": "index"
},
index: function() {
new MainIndexView({ el: 'div.main' });
}
});
return Router;
});
How does this look using the exports method?
Could you give me a snippet?
Am Freitag, 20. Juli 2012 12:28:08 UTC+2 schrieb Miller Medeiros:
>
> Yes it is available (and probably always will), more info about it here:
> https://github.com/jrburke/requirejs/wiki/Differences-between-the-simplified-CommonJS-wrapper-and-standard-AMD-define
>
>
>
>
> From: "dev.pus" <developement....@googlemail.com>
> Reply-To: <requirejs@googlegroups.com>
> Date: Fri, 20 Jul 2012 01:23:33 -0700 (PDT)
> To: <requirejs@googlegroups.com>
> Subject: [requirejs] Syntactic sugar to define dependencies
>
> Hi,
>
> I found following way to define dependencies:
>
> http://requirejs.org/docs/whyamd.html#sugar
>
> I tried this now myself in my modules but failed about this.
>
> Is this feature still available?
>
------=_Part_180_27870871.1342783478181
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Hi,<div><br></div><div>the result looks like:</div><div><br></div><div><div=
>define(function(require, module, exports) {</div><div><br></div><div> =
; var Backbone =3D require('backbone')</div><div>  =
; , MainIndexView =3D require('views/main/index')</div><div> &=
nbsp; , Router</div><div> ;</div><div><br></div>=
<div> Router =3D Backbone.Router.extend({</div><div> &nb=
sp; routes: {</div><div> &n=
bsp; "": "index"</div><div> },</div><div> =
index: function() {</div><div> &nb=
sp; new MainIndexView({ el: 'div.main' });</div><div> &=
nbsp; }</div><div> });</div><div><br></div><div>=
return Router;</div><div>});</div></div><div><br></div><div>H=
ow does this look using the exports method?</div><div>Could you give me a s=
nippet?</div><div><br></div><div><br></div><div><br>Am Freitag, 20. Juli 20=
12 12:28:08 UTC+2 schrieb Miller Medeiros:<blockquote class=3D"gmail_quote"=
style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-=
left: 1ex;"><div style=3D"word-wrap:break-word;color:rgb(0,0,0);font-size:1=
4px;font-family:Calibri,sans-serif"><div>Yes it is available (and probably =
always will), more info about it here: <a href=3D"https://github.com/j=
rburke/requirejs/wiki/Differences-between-the-simplified-CommonJS-wrapper-a=
nd-standard-AMD-define" target=3D"_blank">https://github.com/<wbr>jrburke/r=
equirejs/wiki/<wbr>Differences-between-the-<wbr>simplified-CommonJS-wrapper=
-<wbr>and-standard-AMD-define</a> </div><div><br></div><div><br></div>=
<div><br></div><span><div style=3D"font-family:Calibri;font-size:11pt;text-=
align:left;color:black;BORDER-BOTTOM:medium none;BORDER-LEFT:medium none;PA=
DDING-BOTTOM:0in;PADDING-LEFT:0in;PADDING-RIGHT:0in;BORDER-TOP:#b5c4df 1pt =
solid;BORDER-RIGHT:medium none;PADDING-TOP:3pt"><span style=3D"font-weight:=
bold">From: </span> "dev.pus" <<a href=3D"mailto:developement.pus@google=
mail.com" target=3D"_blank">developement.pus@googlemail.<wbr>com</a>><br=
><span style=3D"font-weight:bold">Reply-To: </span> <<a href=3D"mailto:r=
equirejs@googlegroups.com" target=3D"_blank">requirejs@googlegroups.com</a>=
><br><span style=3D"font-weight:bold">Date: </span> Fri, 20 Jul 2012 01:=
23:33 -0700 (PDT)<br><span style=3D"font-weight:bold">To: </span> <<a hr=
ef=3D"mailto:requirejs@googlegroups.com" target=3D"_blank">requirejs@google=
groups.com</a>><br><span style=3D"font-weight:bold">Subject: </span> [re=
quirejs] Syntactic sugar to define dependencies<br></div><div><br></div><di=
v>Hi,</div><div><br></div><div>I found following way to define dependencies=
:</div><div><br></div><a href=3D"http://requirejs.org/docs/whyamd.html#suga=
r" target=3D"_blank">http://requirejs.org/docs/<wbr>whyamd.html#sugar</a><b=
r><div><br></div><div>I tried this now myself in my modules but failed abou=
t this.</div><div><br></div><div>Is this feature still available?</div></sp=
an></div>
</blockquote></div>
------=_Part_180_27870871.1342783478181--
------=_Part_179_27267254.1342783478181--