mattdesl / budo

:clapper: a dev server for rapid prototyping
MIT License
2.17k stars 106 forks source link

Add pushstate-allow and pushstate-disallow #187

Closed mantoni closed 7 years ago

mantoni commented 7 years ago

As suggested in #150, I'd like to be able to pass the allow and disallow options to connect-pushstate. The way it behaves with this patch applied is

In both cases, --pushstate is implied and does not have to be specified.

I bumped connect-pushstate to the version that introduces the disallow option.

If you want this to behave differently, let me know, and I'll happily make changes.

mantoni commented 7 years ago

For others who come across this: While waiting for feedback on this PR, I've published @studio/budo with this patch applied.

mantoni commented 7 years ago

Something weird happened here – did somebody force-push on master? Anyway, I re-applied the changes on top master to make this mergeable again. 🏋️

mattdesl commented 7 years ago

I'm wondering if we should instead use subarg for this, so it looks like:

budo index.js --pushstate [ --allow foo ]
mantoni commented 7 years ago

@mattdesl Sure, that makes sense and looks nicer. I would replace the minimist dependency with the subarg module then. Is that what you have in mind?