Skip to content

Instantly share code, notes, and snippets.

@objarni
Last active January 16, 2023 13:30
Show Gist options
  • Save objarni/2ece180ddb69eb71564e to your computer and use it in GitHub Desktop.
Save objarni/2ece180ddb69eb71564e to your computer and use it in GitHub Desktop.
Installing gulp in Windows
1. Install nodejs. https://nodejs.org/en/
2. Check npm (node package manager) is installed via command prompt:
$ npm
3. Install gulp:
$ npm install gulp --global
4. In relevant project folder, create 'gulpfile.js':
// build flow that copies MyNiceProgram.exe to another
// directory (with forced folder creation and overwrite)
var gulp = require('gulp');
var exefile = 'some/bin/path/MyNiceProgram.exe';
gulp.task('build', function(){
gulp.src(exefile).pipe(gulp.dest('../../Binaries/'));
});
gulp.task('default', ['build'], function(){
gulp.watch(exefile, ['build']);
});
5. Run gulp:
$ gulp
@lamjar
Copy link

lamjar commented Mar 19, 2017

npm install gulp-cli -g
npm install gulp -D
touch gulpfile.js
gulp --help

@BojanKomazec
Copy link

@lamjar To use touch on Windows you have to use it with redirection operator:
touch>gulpfile.js

@lizardscruff
Copy link

there's no such thing as touch on windows...

@mrozdev
Copy link

mrozdev commented Jun 9, 2019

Windows command;
copy NUL gulpfile.js

@zb-z
Copy link

zb-z commented Sep 3, 2019

there's no such thing as touch on windows...

Then how comes I've just run it ? :-) Yes, there is a trick involved. https://sourceforge.net/projects/unxutils/files/unxutils/current/ - grab UnxUtils.zip. It's old and kind of pretends to be Unix too much :-) but what I have is it's wbin with libfl.a, libfl.lib and sh.exe added and wbin is in my path. Judging by the sizes I also have UnxUpdates.zip (from http://unxutils.sourceforge.net/) merged in, albeit with different timestamps. It's an old bag that people have been copying around for ages. There might be some commands that don't work but simple things like touch do.

@David263
Copy link

Why so complicated to install a modern tool? Gulp should be fixed to live in Windows. Also see https://stackoverflow.com/questions/33051213/installing-gulp-to-windows-10 .

@tounsils
Copy link

Thanks

@MessiDaGod
Copy link

there's no such thing as touch on windows...

there is now with bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment