gulp-svn2
SVN plugin for gulp (gulpjs.com)
Last updated 3 years ago by xsbchen .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install gulp-svn2 
SYNC missed versions from official npm registry.

#gulp-svn NPM version

Package gulp-svn2
Description SVN plugin for Gulp
Node Version >= 0.11.12
Gulp Version 3.x

Usage

Install

npm install gulp-svn2 --save

Example

var gulp = require('gulp')
var svn = require('gulp-svn')

// Run svn add
gulp.task('add', () => {
    return svn.add('/file.js')
}

// Run svn add with error
gulp.task('add', () => {
    return svn.add('./file.js', (err) => {
        if(err) throw err
    })
})

// Run svn add with options
gulp.task('add', () => {
    return svn.add('./file.js', {args: '--force'}, (err) => {
        if(err) throw err
    })
})

// Run svn revert some file
gulp.task('revert-file', () => {
    return svn.revert('somefile.js', (err) => {
        if(err) throw err
    })
})

// Run svn revert with some directory recursively
gulp.task('revert', () => {
    return svn.revert('directory', { args: '-R' }, (err) => {
        if(err) throw err
    })
})

// Run svn commit
gulp.task('commit', () => {
    return svn.commit('Initial commit', (err) => {
        if(err) throw err
    })
})

// Run svn tag
gulp.task('tag', () => {
    svn.tag('version-0.0.1', 'Tagged commit', (err) => {
        if(err) {
            throw err
        }
    })
})

// Run gulp
gulp.task('default',['add', 'commit'])

Synchronous tasks are also available, suffixed with 'Sync'. For instance use the task name, moveSync instead of move.

Current Tags

  • 2.0.0                                ...           latest (3 years ago)

1 Versions

  • 2.0.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 4
Dependencies (4)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |