Capistrano::Yeoman
Capistrano plugin that integrates Yeoman workflow into capistrano deployment script.
Installation
If you have Gemfile
Add those lines to your application's Gemfile:
gem 'capistrano', '~> 3.1'
gem 'capistrano-yeoman'
And then execute:
$ bundle install
If not - install it yourself as:
$ gem install capistrano-yeoman
Usage
# Capfile
require 'capistrano/yeoman'
# config/deploy.rb
set :linked_dirs, %w{node_modules app/bower_components}
after "deploy:updated", "yo:build"
and link your ...appdir/curent/dist folder in your nginx/apache/other web serwer.
How it works?
After updating code on the server it:
- installs yeoman (if its not already installed)
- runs
npm install
- runs
bower install
- finally
$grunt build
Dependencies
Nodejs with npm have to be installed on your server. In case of using sass also ruby with compass should be in your PATH.
It's good to update the npm before first deploy (sudo npm update npm -g
), but after that be sure that your deploying user has access to ~/.npm dir and ~/tmp (if it exist).
Tasks
- yo:install - installs yeoman locally in node_modules (only if its not already installed)
- grunt:build
- bower:install
- npm:install
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request