-
Notifications
You must be signed in to change notification settings - Fork 4
Showcase
Benjamin Arthur Lupton edited this page Jun 26, 2014
·
12 revisions
A place to showcase the cool chains you've put together
// Fetch the cwd's branches, and convert them into an array
require('chainy').create().require('set exec log')
.set('git branch --no-color')
.exec()
.action(function(value){
return value.replace('*', '').replace(/ |^\s+|\s+$/g, '').split('\n');
})
.log();
// Fetch the cwd's branches, and delete each of them except master from the git remote
require('chainy').create().require('set exec each')
.set('git branch --no-color')
.exec()
.action(function(value){
return value.replace('*', '').replace(/ /g, '').split('\n').filter(function(value){
if ( value === 'master' ) return false;
return true;
});
})
.map(function(value, complete){
this.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