Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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

This comment has been minimized.

Copy link

@lamjar lamjar commented Mar 19, 2017

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

This comment has been minimized.

Copy link

@BojanKomazec BojanKomazec commented Sep 12, 2018

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

@lizardscruff

This comment has been minimized.

Copy link

@lizardscruff lizardscruff commented Dec 21, 2018

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

@mrozdev

This comment has been minimized.

Copy link

@mrozdev mrozdev commented Jun 9, 2019

Windows command;
copy NUL gulpfile.js

@zb-z

This comment has been minimized.

Copy link

@zb-z 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

This comment has been minimized.

Copy link

@David263 David263 commented Dec 23, 2019

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

This comment has been minimized.

Copy link

@tounsils tounsils commented Apr 10, 2020

Thanks

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