{"versions":{"0.1.0":{"name":"connect-pushstate","description":"Connect middleware that rewrites select requests to the site/custom root, thus allowing your pushstate router to handle them","version":"0.1.0","homepage":"https://github.com/brentertz/connect-pushstate","author":{"name":"Brent Ertz","email":"brent.ertz@gmail.com","url":"http://brentertz.com"},"repository":{"type":"git","url":"git://github.com/brentertz/connect-pushstate.git"},"bugs":{"url":"https://github.com/brentertz/connect-pushstate/issues"},"licenses":[{"type":"MIT","url":"https://github.com/brentertz/connect-pushstate/blob/master/LICENSE-MIT"}],"main":"Gruntfile.js","engines":{"node":">= 0.8.0"},"scripts":{"test":"grunt test"},"dependencies":{},"devDependencies":{"grunt":"~0.4.1","grunt-contrib-jshint":"~0.6.0","grunt-mocha-test":"~0.8.0","connect":"~2.11.1","chai":"~1.8.1","request":"~2.27.0"},"peerDependencies":{"grunt":"~0.4.1"},"keywords":["connect","middleware","rewrite","pushstate","routing"],"_id":"connect-pushstate@0.1.0","dist":{"shasum":"f01eb5f50b30c97433a1dab50b2fb95d2226250d","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/connect-pushstate/-/connect-pushstate-0.1.0.tgz","integrity":"sha512-wY2f5POws671ZyyXzMfuDWAIgC7kxL+Ijs7waPAAVdqY8nadp5VIQzVQVkF8Y5DUVdUQBnufPbA38EHDqRVNcw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCH30cxRdlo/QtrMA0mRL9GXGoORs+xi/wIi4CrOUc1B4CIQCLx1UWafzT0Y+fZsOYH8mEhzZeYqzDKJABvwChmGItPw=="}]},"_from":".","_npmVersion":"1.3.11","_npmUser":{"name":"anonymous","email":"brent.ertz@gmail.com"},"maintainers":[{"name":"anonymous","email":"brent.ertz@gmail.com"}],"contributors":[]},"1.0.0":{"name":"connect-pushstate","description":"Connect middleware that rewrites select requests to the site root, allowing your client-side pushstate router to handle them","version":"1.0.0","homepage":"https://github.com/brentertz/connect-pushstate","author":{"name":"Brent Ertz","email":"brent.ertz@gmail.com","url":"http://brentertz.com"},"repository":{"type":"git","url":"git://github.com/brentertz/connect-pushstate.git"},"scripts":{"test":"grunt test"},"dependencies":{},"devDependencies":{"chai":"^1.10.0","connect":"^3.3.4","grunt-contrib-jshint":"^0.10.0","grunt-mocha-test":"^0.12.6","mocha":"^2.1.0","morgan":"^1.5.1","request":"^2.51.0","serve-static":"^1.8.0"},"keywords":["connect","middleware","rewrite","pushstate","routing"],"gitHead":"0eae4bf17a8462d66d2e9944ac29c872126e322d","bugs":{"url":"https://github.com/brentertz/connect-pushstate/issues"},"_id":"connect-pushstate@1.0.0","_shasum":"cdc82173076f01b90bb084983a1f4493d4a28d04","_from":".","_npmVersion":"1.4.28","_npmUser":{"name":"anonymous","email":"brent.ertz@gmail.com"},"maintainers":[{"name":"anonymous","email":"brent.ertz@gmail.com"}],"dist":{"shasum":"cdc82173076f01b90bb084983a1f4493d4a28d04","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/connect-pushstate/-/connect-pushstate-1.0.0.tgz","integrity":"sha512-qZoNfS3UJoTRL5e1Uwm9VRPJDKOkHuTulAkQsNSJFANWJWumiGCQxAUnHMtesnlgu3vBfmMbK7arz75tJr2YfQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHbm6F2OUIx+2KTdyB5eyItOL5fokHmWDmvXcsMSzVjCAiBQEPDDgpEguBQ3YpEljTGBRKWjpz1D4UZ6eEIkG1/dYg=="}]},"contributors":[]},"1.1.0":{"name":"connect-pushstate","description":"Connect middleware that rewrites select requests to the site root, allowing your client-side pushstate router to handle them","version":"1.1.0","homepage":"https://github.com/brentertz/connect-pushstate","author":{"name":"Brent Ertz","email":"brent.ertz@gmail.com","url":"http://brentertz.com"},"license":"MIT","repository":{"type":"git","url":"git://github.com/brentertz/connect-pushstate.git"},"scripts":{"test":"grunt test"},"dependencies":{},"devDependencies":{"chai":"^1.10.0","connect":"^3.3.4","grunt":"^1.0.1","grunt-contrib-jshint":"^0.10.0","grunt-mocha-test":"^0.12.6","mocha":"^2.1.0","morgan":"^1.5.1","request":"^2.51.0","serve-static":"^1.8.0"},"keywords":["connect","middleware","rewrite","pushstate","routing"],"gitHead":"0b2bf48948b97b5cba2d8e0a59dec737d18d9605","bugs":{"url":"https://github.com/brentertz/connect-pushstate/issues"},"_id":"connect-pushstate@1.1.0","_shasum":"bcab224271c439604a0fb0f614c0a5f563e88e24","_from":".","_npmVersion":"3.8.3","_nodeVersion":"5.10.1","_npmUser":{"name":"anonymous","email":"brent.ertz@gmail.com"},"dist":{"shasum":"bcab224271c439604a0fb0f614c0a5f563e88e24","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/connect-pushstate/-/connect-pushstate-1.1.0.tgz","integrity":"sha512-5p2H2+eXkCiqcSZqZbTh5TLcLsl1wub7VKrRnfHyorC+pxXjF6nfswda4YMluYhGMo+33eR/58weorzSi9uSbA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHjvQYPiDomgBT5HiWzFb2lPVmuZozsn5Q0X+/9qQu0JAiEAo06hkAttHj0yCFc9wOFCd9ABVGJbSqSrPOakpT47gYc="}]},"maintainers":[{"name":"anonymous","email":"brent.ertz@gmail.com"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/connect-pushstate-1.1.0.tgz_1479735437314_0.0225876544136554"},"contributors":[]}},"dist-tags":{"latest":"1.1.0"},"name":"connect-pushstate","time":{"modified":"2022-01-26T20:55:55.978Z","created":"2022-01-26T20:55:55.978Z","0.1.0":"2013-12-08T00:39:34.819Z","1.0.0":"2015-01-08T17:16:26.775Z","1.1.0":"2016-11-21T13:37:17.556Z"},"readme":"# connect-pushstate\n\nConnect middleware that rewrites select requests to the site root, allowing your client-side pushstate router to handle them.\n\nRequests including a file extension are left untouched so site assets like your images, stylesheets, and JavaScripts will load unaffected, while requests without a file extension, presumably pages or actions within your site, are rewritten to point at the root, with the original URL intact.\n\nYou can also specify regular expressions to specifically allow or disallow additional paths from being affected.\n\nThis functionality is commonly needed by single page web-apps.\n\n## Getting Started\n\nInstall package\n\n```shell\nnpm install connect-pushstate --save\n```\n\nLoad the middleware by adding the following line of JavaScript.\n\n```js\nvar pushState = require('connect-pushstate');\n```\n\nAdd the `pushState` middleware call to your server definition, amongst your other middleware.\n\n##### Options\n\nThe pushState method accepts an options object as an optional parameter with the following properties.\n\n* __root__ - The location where requests will be rerouted to.  Defaults to '/'. e.g. `pushState({ root: '/foo' })`\n* __allow__ - A pattern that will allow requests matching it to pass through without being redirected.  e.g. `pushState({ allow: '^/api' })`  You might need this option if your client app and API are on the same server.\n* __disallow__ - A pattern that will disallow requests matching it to pass through without being redirected.  e.g. `pushState({ disallow: '^/version/1.2.3' })`\n\n```js\n'use strict';\n\nvar connect = require('connect');\nvar morgan = require('morgan');\nvar serveStatic = require('serve-static');\nvar pushState = require('connect-pushstate');\nvar port = process.env.PORT || 3000;\n\nvar app = connect()\n.use(pushState())\n.use(serveStatic('www/'))\n.use(morgan('dev'))\n.listen(port, function() {\n\tconsole.log('Application server stated on port', port);\n});\n```\n_Note that [serve-static](https://www.npmjs.com/package/serve-static) is needed in order to actually serve your files._\n\n## Examples\n\nFor a quick demo, see the examples directory, or run the test suite.\n\n```shell\ncd examples\nnode server.js\n```\n\n## Tests\n\nExecute the test suite\n```\nnpm test\n```\n\n## Contributing\n\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.\n\n## Release History\n- 1.1.0 Add \"disallow\" option.  Add grunt package to devDependencies.\n- 1.0.0 Introduce options object. Add \"allow\" option. Simplify directory structure. Update dependencies. Other minor housekeeping.\n- 0.1.0 Initial release","users":{}}