zeevl / connect-include

A node connect middleware component to allow for SSI-style includes
5 stars 5 forks source link

Update instructions for grunt-contrib-connect 0.7.0 #2

Closed jraller closed 10 years ago

jraller commented 10 years ago

In order to get things working with grunt-contrib-connect 0.7.0 I found the following more helpful than the example in the readme:

middleware: function(connect, options) {
    // Same as in grunt-contrib-connect
    var middlewares = [];
    var directory = options.directory || options.base[options.base.length - 1];
    if (!Array.isArray(options.base)) {
        options.base = [options.base];
    }

    // Here comes the PHP middleware
    middlewares.push(ssInclude(directory));

    // Same as in grunt-contrib-connect
    options.base.forEach(function(base) {
        middlewares.push(connect.static(base));
    });

    middlewares.push(connect.directory(directory));
    return middlewares;
}

Can the code be added to this repository? There are some minor fixes like commenting out or removing the two unused lines that would be nice to be able to submit a pull request for.

zeevl commented 10 years ago

Thanks for the feedback! Would you be willing to submit a pull request for these changes?

jraller commented 10 years ago

Yes, I can do that for the README.md file. Are you open to the idea of having the rest of the source here as well?

zeevl commented 10 years ago

You mean like a working example..?

jraller commented 10 years ago

When I look at this repo I see only the README.md file. I'm not seeing the lib/connect-include.js file for example.

zeevl commented 10 years ago

wtf!? Not sure how that happened, and how we've gone so long without noticing that. I have several projects that are using it.. yikes.

In any case, it's there now!

jraller commented 10 years ago

Thanks. I'm glad I wasn't missing seeing something. I'll submit my changes to that file next. Thanks this package will really let me simplify my development process.

zeevl commented 10 years ago

you know, if you push an update to the same branch it'll update your PR..

On Mon, Feb 24, 2014 at 10:07 PM, Jason Aller notifications@github.comwrote:

Closed #2 https://github.com/zeevl/connect-include/issues/2.

Reply to this email directly or view it on GitHubhttps://github.com/zeevl/connect-include/issues/2 .