将文件上传到Plunker

Ser*_*ver 32 plunker

有没有办法将多个文件上传到http://plnkr.co,而不是一直复制粘贴代码?如果一个plunker可以连接到github存储库,或者如果可以拖入一组文件,那将会很棒.

Geo*_*man 18

没有内置方法可以将多个文件上传到Plunker.

用户已经构建了工具来促进这一点.请参阅:https://www.npmjs.org/package/plunk这是一个命令行实用程序,可以让您从目录的内容创建plunks.

您还可以通过向有效负载具有以下格式的位置发出POST请求来引导plunks http://plnkr.co/edit/:

{
  "description": "Plunk description", // Optional
  "tags": ["tag1", "tag2", ..., "tagN"], // Optional
  "files": {
    "filename1.ext": "contents of filename1.ext",
    "filename2.ext": "and so on.."
  }
}
Run Code Online (Sandbox Code Playgroud)

此处理程序的代码:https://github.com/filearts/plunker_www/blob/0c608ae80ef30d59bfdfeaf3c2a28563f7b730e4/app.coffee#L105-L121

  • 在Plunker.NEXT中,您可以将文件或zip文件拖到目录树中,这样就可以非常简化了. (4认同)
  • 是Plunker.Next在线吗?能够将`.zip`文件拖到编辑器目录中吗? (2认同)