cujojs / curl

curl.js is small, fast, extensible module loader that handles AMD, CommonJS Modules/1.1, CSS, HTML/text, and legacy scripts.
https://github.com/cujojs/curl/wiki
Other
1.89k stars 216 forks source link

link! plugin doesn't support parent directories like "../" #108

Closed SimplGy closed 11 years ago

SimplGy commented 11 years ago

Parent and current directory references ('../' and './') work in other areas of my app. When I try to do it using the link! plugin, my debugging tools show me the path isn't being respected. Should I be able to reference a parent dir using this plugin?

doesn't work:

curl( [
,    'link!../dcx/appWide/all.css'
]).then(function(allcss) {
    // Not loaded, in this case, although 'allcss' is an empty stylesheet object so it's tough to test
});

works:

curl({
    baseUrl: '../'
}, [
    'link!dcx/appWide/all.css'
]).then(function() {
   // loaded, in this case.
});
unscriptable commented 11 years ago

investigating...

unscriptable commented 11 years ago

Sorry, for some reason this issue fell off my radar. It does seem that curl has some troubles with navigating up directories in some cases. It's related to our emphasis on packages in preference to paths, but we clearly need to stop breaking valid path navigation. Putting this on the list of fixes for 0.7.