gruntjs/grunt-contrib-connect

connect.static gone since 0.11, replaced with serveStatic

zeripath opened this issue · 2 comments

Hi!

Thanks so much for your code. I'm just updating an old project and have been upgrading my dependencies in turn. I've noticed that since 0.11 and the update to connect 3 the syntax for delivering static content has changed. I wonder if it would be possible for you to include a bit of information in your changelog on this change to warn users, and if possible either link to some information on how to update our Gruntfiles or add some information. I will continue looking at my code and will update this issue with my findings.

OK, so it appears very simple:

At the top of your Gruntfile.js you need to add:

var serveStatic = require('serve-static');

Then wherever connect.static is used you simply replace:

connect.static(...)

with:

serveStatic(...)

Or at least that appears to be it.

We updated the docs with this, feel free to PR mode doc updates if needed