A tiny utility to post current directory contents to http://plnkr.co/edit
plunk
Or plunk --dir path/to/dir --desc "A string describing the plunk" --tags "comma,separated,tags"
.
To submit plunks under your user and to update them, you need to be authorized.
For that:
document.cookie.match(/plnk_session=(\w+)/)[1]
to obtain the session id.~/.plunk_config.json
with the content { "auth": { "id": "..." } }
, where ...
means the output of step 2.This will save an authorized session which the utility will use.
An example of ~/.plunk_config.json
:
{
"auth": { "id": "56224aba860eabcdef869189" }
}
'.'
.plunk
, uses it to update the plunk properly.plunk
will create a brand-new plunk.
I found this behavior helpful, because when I clone an existing directory into a new example, it makes me sure I will not overwrite an existing plunk.--tags
flag only works when creating a new plunk, not updating an existing one.