npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

grunt-svn-commander

v0.1.8

Published

Some useful SVN commands for your GruntJS builds.

Downloads

124

Readme

grunt-svn-commander

Some useful SVN commands for your GruntJS builds.

Getting Started

This plugin requires Grunt 0.4.x

If you haven't used Grunt before, be sure to check out the Getting Started guide, as it explains how to create a Gruntfile as well as install and use Grunt plugins. Once you're familiar with that process, you may install this plugin with this command:

npm install grunt-svn-commander --save-dev

Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:

grunt.loadNpmTasks('grunt-svn-commander');

The "svn_commander" task

Overview

In your project's Gruntfile, add a section named svn_commander to the data object passed into grunt.initConfig().

You must have SVN on the command-line for this task to work and you must have committed the target directory to your repo. Tested against svn 1.7.10.

grunt.initConfig({
  svn_commander: {

    ignoreSetter: {
		options: {
			type: 'ignore'
			,doneCallback: function() {
				console.log( "all good" );
			}
		},
		rootDir: "test"
	}

  },
});

Options

options.type

Type: String Default value: ignore

A string value that is used to choose an svn command.

  • ignore will look inside the specified rootDir path for a config file (default name svnignore.config) and use that to set the svn:ignore property. Accepts options fileName (String) and doneCallback (Function).

  • props-clear will delete the specified svn properties on the specified rootDir. Accepts options doneCallback (Function), clearRecursively (Boolean) and propType (string).

  • command allows you to easily run a custom SVN command. Accepts only the cmd (string) option. rootDir is irrelevant in this task.

options.fileName

Type: String Default value: ignore

Specify a custom filename for the svn ignore config. Defaults to svnignore.config. Only for type = ignore.

options.doneCallback

Type: Function Default value: (empty function)

Specify a callback for when the task is done. Defaults to an empty function. For type of ignore or props-clear.

options.clearRecursively

Type: Booleam Default value: true

Specify fully recursive lookup for svn property clearage. Defaults to true. Only for type = props-clear.

options.propType

Type: string Default value: ignore

Specifiy svn property to clear. Defaults to ignore. Only for type = props-clear.

options.cmd

Type: string Default value: (A sample 'echo' message)

Specifiy a custom svn command. Defaults to a sample echo message. Only for type = command.

Usage Examples

svn_commander: {

  propsClearer: {
    options: {
      type: 'props-clear'
      ,propType: 'ignore'
      ,doneCallback: function() {
        console.log( "all props cleared" );
      }
    },
    rootDir: "test"
  }

  ,ignoreSetter: {
    options: {
      type: 'ignore'
      ,doneCallback: function() {
        console.log( "all ignore props set" );
      }
    },
    rootDir: "test"
  }

  ,runCommand: {
    options: {
      type: 'command'
      ,cmd: "echo 'running custom svn command\n'"
    }
  }
}

Release History

  • 0.1.8: Added support for arrays of svn clear props and defaulted to 'ignore' and 'externals'.
  • 0.1.7: Fixed the grunt.spawn issue with 'svn commit' not working and added more specific logs (coloured).
  • 0.1.6: Removed dot at the end of propset, as it was causing root to get unwanted props set.
  • 0.1.5: Ignore "node_modules" folder when setting svnprops.
  • 0.1.4: Added array of commands option and svn:externals option
  • 0.1.3: Minor readme changes.
  • 0.1.2: Passed tests on all tasks, but will need more real-world testing.
  • 0.1.1: Made some more progress but still not functional.
  • 0.1.0: Initial port over from grunt.jimd.utils. Still a work in progress.