jupiterjs/steal — Issue #60: less @import not working
Author: amelon
Created: 2011-12-26 11:48:46+00:00
State: open

Before the change in following commit:
https://github.com/jupiterjs/steal/commit/df767eaffdea1ba473c1500bc26c2609934804d2#less/less.js

I could use @import in a less file, like this:
@import "bos_vars";
And it was woking in both build and load (prod & dev env).

In the following code, if I remove test "if (!steal.isRhino) {", it works again.

```javascript
var paths = [];
if (!steal.isRhino) {
var pathParts = options.src.split('/');
pathParts[pathParts.length - 1] = ''; // Remove filename
paths = [pathParts.join('/')];
}
```

With test (steal.isRhino), during build I get following error:

```
Building to cust/
failed to open file file:/c:/wwg/test/cust/scripts/bos_vars.less JavaException: java.io.FileNotFoundException:
c:\wwg\test\cust\scripts\bos_vars.less (Le fichier spécifié est introuvable = unable to find file)
!!!!!!!!!!! ERROR !!!!!!!!!!!

-message = Cannot call method "indexOf" of null
-fileName = steal/rhino/env.js
-lineNumber = 24532
-name = TypeError
```

Actually, build script try to load bos_vars.less from the build file path located in c:/wwg/test/cust/scripts and not from the "importer" less file path located in c:/wwg/test/bos

```
test
/cust
/build
/build.js
/build.html
/bos
/bos_vars.less
/bos_icon.less <-- file importing bos_vars.less
```

bos_icon.less file:
```
...
@import "bos_vars";
...
```