fmal / gulp-inline-source

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

pass options to inline-source #4

Closed ghost closed 10 years ago

ghost commented 10 years ago

I found this necessary in order to disable compression, since I'm using uglify directly for more control.

geoffreydhuyvetters commented 10 years ago

you can define the htmlpath in the options so there is no need for that argument anymore. just let us pass in options like the original inline-source syntax

ghost commented 10 years ago

In the readme it looks like this

    var html = inline(htmlpath, {
        compress: true,
        swallowErrors: false,
        rootpath: path.resolve('www')
     });

inline(htmlpath, [html], [options]) If html content is omitted, content will be loaded from htmlpath.

So it looks like htmlpath is still required, but you could remove file.contents.toString() and let inline-source load it, but I don't really see any point, and I don't think I should add that to this pull request.

If I'm missing something, let me know.

geoffreydhuyvetters commented 10 years ago

that's correct, my bad. I totally misread the docs :)

ghost commented 10 years ago

No worries :)

fmal commented 10 years ago

Thanks @coreytrampe !