fmal / gulp-inline-source

Inline flagged js & css sources.
MIT License
212 stars 31 forks source link

Fixed issue with options object creation #19

Closed sebastianrosik closed 9 years ago

sebastianrosik commented 9 years ago

This fixes a situation when we don't give any options for the plugin and we are processing more than one file:

First file: file.path is "X/Y/A.html" [OK] options.rootpath is "X" [OK] options.htmlpath is "Y/X/A.html"

Second file: file.path is "X/Y/B.html" [NOT] options.rootpath is "X" [NOT] options.htmlpath is "Y/X/A.html"

So it no options was specified, it was creating options object with properties that had values of the first file, which of course was causing a n Error because it could not load a inlined stylsheet from the right location (in the second processed file).

fmal commented 9 years ago

Awesome, thanks!