Quantcast
Channel: JavaScriptMVC Forum
Viewing all articles
Browse latest Browse all 3491

Using CSS and LESS dependencies with StealJS 0.3.0

$
0
0
Hello

I'm getting unexpected results with StealJS. (using StealJS 0.3.0) I'd like to load both a .css file and a .less file. But I want the .css file to be included first. This works great in development. But building the production file fails. (error below)

This works in development.
  1. steal('jquery',
  2.     'can',
  3.     'css/reset.css!',
  4.     'css/test.less!',
  5.     function($, can) {
  6.         $(document.body).html("<h1>Hello World</h1>");
  7. });
But produces this build error:
  1. patricks-MacBook-Pro:www patrickclancy$ node buildjs.js
  2. OPENING: test
  3. Transpiling...
  4. ERROR: undefined undefined
  5. build is successful

The strange part is switching the order of the .less and .css file. So that the .less file dependency is declared first. Produces a successful build but doesn't include the reset first in production file.

  1. ...  
  2.     'css/test.less!',
  3.     'css/reset.css!',
  4. ...

In my stealconfig defining the dependency has no effect on load order or build success.

Statement in my steal.config meta object .

  1. "css/test.less": {deps: ["css/reset.css!"]}


Any feedback or help would be greatly appreciated.

patrick







Viewing all articles
Browse latest Browse all 3491

Trending Articles