-
Notifications
You must be signed in to change notification settings - Fork 4
Showcase
Benjamin Arthur Lupton edited this page May 15, 2014
·
12 revisions
A place to showcase the cool chains you've put together
// Fetch the cwd's branches, and delete each of them except master from the git remote
var Chainy = require('chainy').extend().require(['exec', 'swap', 'forEach', 'done']);
Chainy.create()
.exec('git branch --no-color')
.swap(function(value){
return value.replace('*', '').replace(/ /g, '').split('\n').filter(function(value){
if ( value === 'master' ) return false;
return true;
});
})
.forEach(function(value, complete){
Chainy.create()
.exec(function(){
return 'git push origin :'+value;
})
.done(complete)
})
Navigate using the sidebar on the right.
This wiki content is:
Copyright 2014+ Bevry Pty Ltd
Permissively licensed under the Creative Commons Attribution 4.0 International License