Skip to content

Instantly share code, notes, and snippets.

@vernak2539
Created April 26, 2016 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vernak2539/500e5727be1b9c6d6ff77d02401dabae to your computer and use it in GitHub Desktop.
Save vernak2539/500e5727be1b9c6d6ff77d02401dabae to your computer and use it in GitHub Desktop.
Simple gulp task for initializing paket
// You've installed paket in your repo, but the .exe file isn't there, just paket.bootstraper.exe
// This sample can be used by gulp to make sure others working on your project can get setup correctly
var gulp = require('gulp');
gulp.task('paket:init', [], function(callback) {
var paket = spawn('./.paket/paket.bootstrapper.exe', []);
var log = function(msg) {
msg = msg.toString('utf8');
console.log(msg);
};
paket.stdout.on('data', function(msg) { log(msg); });
paket.stderr.on('data', function(msg) { log(msg); });
paket
.on('error', function(err) {
callback(err);
})
.on('exit', function(code) {
if(code > 0) {
callback(new Error('Download of Paket.exe failed with code ' + code));
return;
}
callback();
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment