{"id":18484147,"url":"https://github.com/jdf2e/jdf-upload","last_synced_at":"2025-05-13T21:12:57.526Z","repository":{"id":57279969,"uuid":"73681476","full_name":"jdf2e/jdf-upload","owner":"jdf2e","description":"jdf上传模块，包含ftp scp 和http","archived":false,"fork":false,"pushed_at":"2017-08-14T05:32:57.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T19:31:42.532Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdf2e.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-14T08:06:31.000Z","updated_at":"2016-11-21T03:09:14.000Z","dependencies_parsed_at":"2022-09-17T17:25:09.287Z","dependency_job_id":null,"html_url":"https://github.com/jdf2e/jdf-upload","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdf2e%2Fjdf-upload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdf2e%2Fjdf-upload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdf2e%2Fjdf-upload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdf2e%2Fjdf-upload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdf2e","download_url":"https://codeload.github.com/jdf2e/jdf-upload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254029008,"owners_count":22002284,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T12:38:44.689Z","updated_at":"2025-05-13T21:12:52.491Z","avatar_url":"https://github.com/jdf2e.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# jdf-upload\njdf上传模块，包含ftp scp 和http\n\n[![Build Status](https://travis-ci.org/jdf2e/jdf-upload.svg?branch=master)](https://travis-ci.org/jdf2e/jdf-upload) [![Coverage Status](https://coveralls.io/repos/github/jdf2e/jdf-upload/badge.svg?branch=master)](https://coveralls.io/github/jdf2e/jdf-upload)\n\n## How\n``` js\nconst upload = require('jdf-upload');\nupload(dir, options, jdf);\n```\n\n其中\n\n* dir是jdf upload命令对应的上传文件路径，可以为空，默认就是项目编译路径，假设config.json中projectPath为'product/alla/1.0.0'，上传路径如果是'./widget'的话，就是把编译路径下'product/alla/1.0.0/widget/'下面所有的文件都上传上去，文件的话也是类似，要搞清楚上传对应的关系：\n    * http对应关系为: config.outputDirName + config.projectPath + 上传路径 --\u003e config.rootPrefix + config.target + config.projectPath + 上传路径\n    * scp对应关系为：同上\n    * ftp对应关系为: config.outputDirName + config.projectPath + 上传路径 --\u003e config.target + config.projectPath + 上传路径（不包含config.rootPrefix，因为vsftp直接建的虚拟目录，ftp用户的home直接定位到了config.rootPrefix的位置）\n* options是 命令行其他的参数\n* jdf是jdf对象的引用\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdf2e%2Fjdf-upload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdf2e%2Fjdf-upload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdf2e%2Fjdf-upload/lists"}