# svn-uploading

> A simple svn uploading package

Latest version **2.0.2** (published 2019-12-16) · ISC license · 0 weekly downloads

## Install

```sh
npm install svn-uploading
pnpm add svn-uploading
yarn add svn-uploading
bun add svn-uploading
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2019-12-16 |
| First published | 2019-12-13 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | gqli |
| Maintainers | gqli |
| Keywords | svn, npm, node, subversion, repository, load, upload, push, commit, svn-spawn, node-svn-ultimate |

## Links

- npm: https://www.npmjs.com/package/svn-uploading
- Repository: https://github.com/gqlicomeon/svn-uploading
- Homepage: https://github.com/gqlicomeon/svn-uploading#readme
- Issues: https://github.com/gqlicomeon/svn-uploading/issues
- npm.io page: https://npm.io/package/svn-uploading

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 2.0.2 (latest) — 2019-12-16
- 2.0.1 — 2019-12-15
- 2.0.0 — 2019-12-15
- 1.3.1 — 2019-12-15
- 1.3.0 — 2019-12-15
- 1.2.2 — 2019-12-15
- 1.0.0 — 2019-12-13

## README

# svn-uploading
一个简便的svn代码上传模块，一键上传代码到svn
## 安装：
`$ npm install svn-uploading`

## 用法示例：
初始化svn仓库
```js
    const SvnUploading = require("svn-uploading");
    //可以初始化多个仓库
    svn = new SvnUploading({
       cwd:""//要上传文件所处的svn checkout目录绝对路径，{必填}
    })
```
`svn update 更新代码`
```js
    svn.update().then(res=>{
        //do something
    }).catch(err=>{
        //something error
    })
```
`svn check 查看代码更改状态`
```js
    /**
     * 方法返回promise 的thenable对象
     * */
    svn.check().then(status=>{
        //do something
        //status ==> {addList:["addfilepath1","addfilepath2",...],modifyList:["modifypath1",modifypath2,...],deleteList:[],unknownList:[]}
    }).catch(err=>{
        //something error
    })  
```
`svn add 添加代码到svn仓库`
```js
    /**
    *@param {String} 要添加到仓库的文件或文件夹的路径(绝对路径或相对路径)，不填则默认为初始化cwd目录下的所有文件
    */
    svn.add(url).then(res=>{
         //do something
    }).catch(err=>{
        //something error
    })
```
`svn delete 删除代码`
```js
    /**
    *@param {String}（必填）要删除的仓库文件或文件夹的路径(绝对路径或相对路径) 
    */
    svn.add(url).then(res=>{
         //do something
    }).catch(err=>{
        //something error
    })
```

`svn commit 上传代码`
```js
    /**
    *@param {Object}（必填）要删除的仓库文件或文件夹的路径(绝对路径或相对路径) 
    * @description {name} 上传单个文件时name为文件或文件名的相对路径或绝对路径；若上传cwd路径下的所有文件，name传空
    * @description {msg} 本次上传说明
    */
    svn.commit(ops).then(res=>{
        //do something
    }).catch(err=>{
        //something error
    })
```

`svn upload 组合了以上方法，一键上传文件`
```js
     /**
     * @param {Object}
     * @description {name} 上传单个文件时name为文件或文件名的相对路径或绝对路径；若上传cwd路径下的所有文件，name传空
     * @description {msg} 本次上传说明
     */
    svn.upload(opts).then(res=>{
        //do something
    }).then(err=>{
         //something error
    })
```

---
_Source: https://npm.io/package/svn-uploading · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
