grunt-node-deploy
v0.1.4
Published
Deployment tool for grunt.
Downloads
7
Maintainers
Readme
grunt-node-deploy
Deployment tool for grunt.
Getting Started
This plugin requires Grunt ~0.4.1
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-node-deploy --save-dev
Once the plugin has been installed, it may be enabled inside your Gruntfile with this line of JavaScript:
grunt.loadNpmTasks('grunt-node-deploy');
Documentation
###Example config
Basic configuration
grunt.initConfig({
deploy: {
production: {
// source git repository to fetch release from
repository: '[email protected]:BonsaiDen/JavaScript-Garden.git',
// Repository branch. Default: 'master'
branch: 'gh-pages',
// amount of releases to keep on the server. Default: 3
keepReleases: 5,
// server options
user: 'test',
domain: 'my.domain.com',
deployTo: '/opt/www/my.domain.com',
// your tasks
tasks: {
afterNpm: function (run) {
run('cd {{latestRelease}}; node build');
run('mv {{latestRelease}}/{site,public}');
},
restart: function (run) {
run('/etc/init.d/nginx restart');
}
}
}
}
});
grunt.loadNpmTasks('grunt-node-deploy');
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using Grunt.
Release History
(Nothing yet)
Inspired by Capistrano