#grunt-rackspace
Grunt tasks for working with the Rackspace Cloud Api
###Installation
- Change directories to the root directory of your project.
npm install grunt-rackspace
###Usage
Add the following line to your Gruntfile
grunt.loadNpmTasks('grunt-rackspace')The rackspace task is now available, for example
grunt rackspaceThere is also grunt rackspace --debug
if you want to see debug output.
###Options
Options are placed in the grunt.initConfig section of your Gruntfile in the rackspace object.
Example:
rackspace : {
config : {
authUser : "someCoolUser",
authKey : "1234567890abcdef1234567890abcdef"
},
upload : {
remotedir : "container"
testfiles : {
filename : "test/*",
remotedir : "site"
}
}
}####config
Required options:
authUserThis is a rackspace usernameauthKeyThis is a rackspace Api key
Other options:
authUrlUrl of the rackspace cloud authentication service
####upload
upload is a multitask that organizes files into named groups. Example:
...
upload {
_options : {
remotedir : "container"
localdir : "files"
},
images : {
filename : "images/*"
},
css : {
filename : "css/*"
},
html : {
filename : "*",
localdir : "html"
},
disclaimer : {
filename : "disclaimer.txt"
remotedir : "misc"
}
}
...Required options:
filename
Other options:
remotedirThe location of the remote file:container/dir/subdir/subsubdir, etc.localdirThe location of the local file. This path is removed from the remote file location.- For example, if you want a local file
fun/index.htmlto show up remotely as justindex.html, setfilename : "index.html"andlocaldir : "fun" upload._options.remotedirtop-level starting point (or container) for all remote filesupload._options.localdirtop-level version oflocaldir(affects all files)
Filenames use the minimatch syntax for matching multiple files