33

Is there any way to upload multiple files to http://plnkr.co, instead of copy-pasting the code all the time? Would be great if a plunker could be connected to a github repository, or if a set of files could be dragged in.

Serge van den Oever
  • 4,340
  • 8
  • 45
  • 66
  • 2
    I can't help you with your question, but I suggest that you file your suggestions as an issue on the issues page on github: https://github.com/filearts/plunker_www/issues – steenhulthin Aug 16 '14 at 19:22

1 Answers1

19

There is no built-in way to upload multiple files to Plunker.

Users have built tools to facilitate this. Please see: https://www.npmjs.org/package/plunk which is a command-line utility that will let you create plunks from the contents of a directory.

You can also bootstrap plunks by making POST requests to http://plnkr.co/edit/ where the payload has the following format:

{
  "description": "Plunk description", // Optional
  "tags": ["tag1", "tag2", ..., "tagN"], // Optional
  "files": {
    "filename1.ext": "contents of filename1.ext",
    "filename2.ext": "and so on.."
  }
}

Code for this handler: https://github.com/filearts/plunker_www/blob/0c608ae80ef30d59bfdfeaf3c2a28563f7b730e4/app.coffee#L105-L121

Geoff Goodman
  • 1,224
  • 9
  • 14