diff --git a/README.md b/README.md index 83fbaec..be5fc32 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ var gulpRoutes = require('gulp-routes'); ``` ## API -### [.routesPlugin](index.js#L28) +### [.gulpRoutes](index.js#L28) Create a routes plugin that runs middleware defined on a router. diff --git a/index.js b/index.js index 71ac741..8ad8611 100644 --- a/index.js +++ b/index.js @@ -19,13 +19,13 @@ var gutil = require('gulp-util'); * var routes = gulpRoutes(router); * ``` * - * @name routesPlugin + * @name gulpRoutes * @param {Object} `router` Instance of an [en-route] router * @return {Function} New function for creating a router stream. * @api public */ -module.exports = function routesPlugin(router) { +module.exports = function gulpRoutes(router) { router = router || (this && this.router); if (!router) { throw new gutil.PluginError('gulp-routes', new Error('Expected a valid router object.'));