onedesign / mini-router

An extremely simple router for firing page-specific javascript.
0 stars 0 forks source link

Consider using pillarjs/path-to-regexp for our path completion. #4

Open cmalven opened 9 years ago

cmalven commented 9 years ago

pillarjs/path-to-regexp is a small library that takes nice-looking Express-style paths like '/foo/:bar' and turns them into a regex. Our current implementation just takes a raw regex as the path, which is fine, but this looks nicer, is more intuitive, and would allow us to hand over responsibility for this to a library dedicated to it.

As a part of this we'd have to add Browserify to our build process so that we can require() the path-to-regexp module in mini-router and output a browser-ready bundle.

cmalven commented 9 years ago

P.S. this would be a non-backwards-compatible change so it would bump the project to a 1.x version.