Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Should JamJS load CSS?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Rob Loach  
View profile  
 More options Sep 26 2012, 10:32 am
From: Rob Loach <roblo...@gmail.com>
Date: Wed, 26 Sep 2012 07:32:04 -0700 (PDT)
Local: Wed, Sep 26 2012 10:32 am
Subject: Should JamJS load CSS?

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

{
  "name": "myproject",
  "version": "0.0.1",
  "description": "An example Node.js project",
  "dependencies": {
    // NPM dependencies go here...
    "async": "0.1.22"
  },
  "jam": {
    "dependencies": {
      // Jam dependencies go here...
      "jquery": "1.7.1",
      "underscore": null
    },
    "css": [
      "example.css",
      "myothercssfile.css"
    ],
    "main": "example.js"
  }


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Caolan McMahon  
View profile  
 More options Sep 26 2012, 12:31 pm
From: Caolan McMahon <caolan.mcma...@gmail.com>
Date: Wed, 26 Sep 2012 09:29:03 -0700
Local: Wed, Sep 26 2012 12:29 pm
Subject: Re: Should JamJS load 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?).

Caolan


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rob Loach  
View profile  
 More options Oct 10 2012, 12:39 pm
From: Rob Loach <roblo...@gmail.com>
Date: Wed, 10 Oct 2012 09:39:01 -0700 (PDT)
Local: Wed, Oct 10 2012 12:39 pm
Subject: Re: Should JamJS load CSS?

Just ran into this:
https://github.com/VIISON/RequireCSS


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nebojsa Sabovic  
View profile  
 More options Oct 18 2012, 4:29 pm
From: Nebojsa Sabovic <nsabo...@gmail.com>
Date: Thu, 18 Oct 2012 13:29:27 -0700 (PDT)
Local: Thurs, Oct 18 2012 4:29 pm
Subject: Re: Should JamJS load CSS?

I've been using requirecss with Jam and it works great for injecting css.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Guillaume Lambert  
View profile  
 More options Oct 29 2012, 2:57 pm
From: Guillaume Lambert <falzho...@gmail.com>
Date: Mon, 29 Oct 2012 11:57:15 -0700 (PDT)
Local: Mon, Oct 29 2012 2:57 pm
Subject: Re: Should JamJS load CSS?

So you add it manually to your project alongside Jam? Or you found a way to
add it to the jam dependencies?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Caswell  
View profile  
 More options Oct 29 2012, 3:14 pm
From: Tim Caswell <t...@creationix.com>
Date: Mon, 29 Oct 2012 12:14:10 -0700 (PDT)
Local: Mon, Oct 29 2012 3:14 pm
Subject: Re: Should JamJS load CSS?

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Guillaume Lambert  
View profile  
 More options Oct 29 2012, 3:17 pm
From: Guillaume Lambert <falzho...@gmail.com>
Date: Mon, 29 Oct 2012 12:17:53 -0700 (PDT)
Local: Mon, Oct 29 2012 3:17 pm
Subject: Re: Should JamJS load CSS?

Indeed you are right.

I'm currently using StealJS and this is taken of when building the
production files.

https://github.com/jupiterjs/steal

I might stick with Steal for now, even tho its not as clean as Jam or Volo
and not AMD (for now), but it works well other than that !


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »