JamJS and RequireJS are fantastic as script loaders to handle JavaScript. It might be nice if JamJS also told RequireJS to load the library's associated CSS files? http://requirejs.org/docs/faq-advanced.html#css
That would be useful in some circumstances, but often the order of
included CSS files matters. Developers should be able to override and
order CSS files easily, without the package including them
automatically.
I'd be interested in hearing other peoples thoughts on this though,
because I can see some circumstances where it could make sense to
include the CSS (date select widget perhaps?).
On Wed, Sep 26, 2012 at 07:32:04AM -0700, Rob Loach wrote:
> JamJS and RequireJS are fantastic as script loaders to handle JavaScript. > It might be nice if JamJS also told RequireJS to load the library's > associated CSS files?
> http://requirejs.org/docs/faq-advanced.html#css
> -- > You received this message because you are subscribed to the Google Groups "jamjs" group.
> To post to this group, send an email to jamjs@googlegroups.com.
> To unsubscribe from this group, send email to jamjs+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msg/jamjs/-/v_kax79KQzIJ.
> For more options, visit https://groups.google.com/groups/opt_out.
On Wednesday, September 26, 2012 12:31:03 PM UTC-4, Caolan McMahon wrote:
> That would be useful in some circumstances, but often the order of > included CSS files matters. Developers should be able to override and > order CSS files easily, without the package including them > automatically.
> I'd be interested in hearing other peoples thoughts on this though, > because I can see some circumstances where it could make sense to > include the CSS (date select widget perhaps?).
> Caolan
> On Wed, Sep 26, 2012 at 07:32:04AM -0700, Rob Loach wrote: > > JamJS and RequireJS are fantastic as script loaders to handle > JavaScript. > > It might be nice if JamJS also told RequireJS to load the library's > > associated CSS files? > > http://requirejs.org/docs/faq-advanced.html#css
> > -- > > You received this message because you are subscribed to the Google > Groups "jamjs" group. > > To post to this group, send an email to ja...@googlegroups.com<javascript:>.
> On Wednesday, September 26, 2012 12:31:03 PM UTC-4, Caolan McMahon wrote:
>> That would be useful in some circumstances, but often the order of >> included CSS files matters. Developers should be able to override and >> order CSS files easily, without the package including them >> automatically.
>> I'd be interested in hearing other peoples thoughts on this though, >> because I can see some circumstances where it could make sense to >> include the CSS (date select widget perhaps?).
>> Caolan
>> On Wed, Sep 26, 2012 at 07:32:04AM -0700, Rob Loach wrote: >> > JamJS and RequireJS are fantastic as script loaders to handle >> JavaScript. >> > It might be nice if JamJS also told RequireJS to load the library's >> > associated CSS files? >> > http://requirejs.org/docs/faq-advanced.html#css
>> > -- >> > You received this message because you are subscribed to the Google >> Groups "jamjs" group. >> > To post to this group, send an email to ja...@googlegroups.com. >> > To unsubscribe from this group, send email to >> jamjs+un...@googlegroups.com. >> > To view this discussion on the web, visit >> https://groups.google.com/d/msg/jamjs/-/v_kax79KQzIJ. >> > For more options, visit https://groups.google.com/groups/opt_out.
> On Wednesday, September 26, 2012 12:31:03 PM UTC-4, Caolan McMahon wrote:
>> That would be useful in some circumstances, but often the order of >> included CSS files matters. Developers should be able to override and >> order CSS files easily, without the package including them >> automatically.
>> I'd be interested in hearing other peoples thoughts on this though, >> because I can see some circumstances where it could make sense to >> include the CSS (date select widget perhaps?).
>> Caolan
>> On Wed, Sep 26, 2012 at 07:32:04AM -0700, Rob Loach wrote: >> > JamJS and RequireJS are fantastic as script loaders to handle >> JavaScript. >> > It might be nice if JamJS also told RequireJS to load the library's >> > associated CSS files? >> > http://requirejs.org/docs/faq-advanced.html#css
>> > -- >> > You received this message because you are subscribed to the Google >> Groups "jamjs" group. >> > To post to this group, send an email to ja...@googlegroups.com. >> > To unsubscribe from this group, send email to >> jamjs+un...@googlegroups.com. >> > To view this discussion on the web, visit >> https://groups.google.com/d/msg/jamjs/-/v_kax79KQzIJ. >> > For more options, visit https://groups.google.com/groups/opt_out.
I've been playing with TJ's component system. <https://github.com/component>. It bundles both css and javascript in it's modules.
One issue I recently found while bundling font-awesome for it was that when it concats all the dependent css files together, their relative links break. Joining CSS is not an easy problem. My solution was to rewrite the urls in the css on the fly (when building) to point to the data folders.
In Jam, I just included the css files manually using link tags, if you're dynamically loading in css using javascript just make sure to rewrite relative urls when moving css files around. Unlike javascript files, the css source does care what it's relative to.
>> On Wednesday, September 26, 2012 12:31:03 PM UTC-4, Caolan McMahon wrote:
>>> That would be useful in some circumstances, but often the order of >>> included CSS files matters. Developers should be able to override and >>> order CSS files easily, without the package including them >>> automatically.
>>> I'd be interested in hearing other peoples thoughts on this though, >>> because I can see some circumstances where it could make sense to >>> include the CSS (date select widget perhaps?).
>>> Caolan
>>> On Wed, Sep 26, 2012 at 07:32:04AM -0700, Rob Loach wrote: >>> > JamJS and RequireJS are fantastic as script loaders to handle >>> JavaScript. >>> > It might be nice if JamJS also told RequireJS to load the library's >>> > associated CSS files? >>> > http://requirejs.org/docs/faq-advanced.html#css
>>> > -- >>> > You received this message because you are subscribed to the Google >>> Groups "jamjs" group. >>> > To post to this group, send an email to ja...@googlegroups.com. >>> > To unsubscribe from this group, send email to >>> jamjs+un...@googlegroups.com. >>> > To view this discussion on the web, visit >>> https://groups.google.com/d/msg/jamjs/-/v_kax79KQzIJ. >>> > For more options, visit https://groups.google.com/groups/opt_out.
On Monday, 29 October 2012 15:14:10 UTC-4, Tim Caswell wrote:
> I've been playing with TJ's component system. < > https://github.com/component>. It bundles both css and javascript in > it's modules.
> One issue I recently found while bundling font-awesome for it was that > when it concats all the dependent css files together, their relative links > break. Joining CSS is not an easy problem. My solution was to rewrite the > urls in the css on the fly (when building) to point to the data folders.
> In Jam, I just included the css files manually using link tags, if you're > dynamically loading in css using javascript just make sure to rewrite > relative urls when moving css files around. Unlike javascript files, the > css source does care what it's relative to.
> On Monday, October 29, 2012 1:57:15 PM UTC-5, Guillaume Lambert wrote:
>> So you add it manually to your project alongside Jam? Or you found a way >> to add it to the jam dependencies?
>> On Wednesday, 10 October 2012 12:39:01 UTC-4, Rob Loach wrote:
>>> On Wednesday, September 26, 2012 12:31:03 PM UTC-4, Caolan McMahon wrote:
>>>> That would be useful in some circumstances, but often the order of >>>> included CSS files matters. Developers should be able to override and >>>> order CSS files easily, without the package including them >>>> automatically.
>>>> I'd be interested in hearing other peoples thoughts on this though, >>>> because I can see some circumstances where it could make sense to >>>> include the CSS (date select widget perhaps?).
>>>> Caolan
>>>> On Wed, Sep 26, 2012 at 07:32:04AM -0700, Rob Loach wrote: >>>> > JamJS and RequireJS are fantastic as script loaders to handle >>>> JavaScript. >>>> > It might be nice if JamJS also told RequireJS to load the library's >>>> > associated CSS files? >>>> > http://requirejs.org/docs/faq-advanced.html#css
>>>> > -- >>>> > You received this message because you are subscribed to the Google >>>> Groups "jamjs" group. >>>> > To post to this group, send an email to ja...@googlegroups.com. >>>> > To unsubscribe from this group, send email to >>>> jamjs+un...@googlegroups.com. >>>> > To view this discussion on the web, visit >>>> https://groups.google.com/d/msg/jamjs/-/v_kax79KQzIJ. >>>> > For more options, visit https://groups.google.com/groups/opt_out.