add process.argv #243

Gozala opened this Issue Nov 24, 2012 · 2 comments


None yet
3 participants

Gozala commented Nov 24, 2012

I constantly use query args as program args when running programs in browserify. How do you feel about changing process.argv = [] to

var file = window.location.href.split("?")[0].split("#")[0]
var query = decodeURIComponent(\=|\&/g)
var hash = window.location.hash.substr(1)
var params = [file].concat(query)
if (hash) params.push(hash)
process.argv = params

guybrush commented Nov 26, 2012

sweet idea :D

but I think it is too magically.

i would rather like to have browserify(1) cli-args in process.argv


substack commented Feb 22, 2013

I agree this seems a bit too magical. In any case process handles defining process now.

substack closed this Feb 22, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment