Skip to content
This repository has been archived by the owner on Sep 28, 2019. It is now read-only.

Latest commit

 

History

History
79 lines (55 loc) · 2.07 KB

README.md

File metadata and controls

79 lines (55 loc) · 2.07 KB

grunt-connect-ssi

connect middleware for parsing ssi includes, when using the grunt-contrib-connect.

This is currently in development, and not ready for release

install

*Not yet available

npm install connect-livereload --save-dev

use

note: you will need to rebuild the default connect middleware stack when adding this to the middleware stack

If you are using connect-livereload middleware, you need to make sure that grunt-connect-ssi is ahead of connect-livereload, otherwise, the parsed files will not include the injected livereload script tags

options

Options are not mandatory: app.use(require('grunt-connect-livereload')()); The Options have to be provided when the middleware is loaded:

e.g.:

  app.use(require('grunt-connect-livereload')({

  }));

These are the available options with the following defaults: *coming soon

please see the examples for the app and Grunt configuration.

grunt example

The following example is from an actual Gruntfile that uses grunt-contrib-connect

For use as middleware in grunt simply add the following to the top of your array of middleware.

  require('connect-livereload')(),

You can pass in options to this call if you do not want the defaults.

dev is simply the name of the server being used with the task grunt connect:dev. The other items in the middleware array are all functions that either are of the form function (req, res, next) like checkForDownload or return that like mountFolder(connect, 'something').

credits

tests

*coming soon
run the tests with

mocha

license

MIT License