buildjs / rigger

Javascript file parser and include engine
http://buildjs.github.io/rigger
60 stars 15 forks source link

Prevent rigged files from importing themselves #26

Closed isochronous closed 10 years ago

isochronous commented 10 years ago

add a check in the _getSingle method to compare a file being imported to the file doing the importing. If they match exactly, do not import it, as the file would be importing itself. This is an effort to fix #25 .

isochronous commented 10 years ago

Actually, this isn't ready to go yet, as imported files that import their own directories still import themselves. Need to work on this a little bit more.

isochronous commented 10 years ago

I couldn't ever really get this working properly, and I found another package (https://github.com/timrwood/includer) that did the same thing without all these problems.

DamonOehlman commented 10 years ago

Cool thanks for the heads up on includer. I might make a mention of that here, given I pretty much always use browserify these days.