Skip to content

Tag: gulp

Import two files

Recently started learning imports and faced the following problem After installing the package in gulpfile, you need to make the following entry: Can I somehow make this record using import? The only thing that comes to my mind is: But there one variable is assigned two values, and here, in fact, there are 2 …

Ignore return outside of function with babel 7

I recently updated to babel 7 and webpack 4 and am receiving this error when running our gulp build task: This is caused by the return outside of a function in browser-syncs dev-ip dependency. Is there a way to configure my .babelrc file to ignore this? I’ve tried the following: Installing only producti…

gulp-remember seems to output wrong path

[Using gulp 3.9.0, gulp-cached 1.1.0, gulp-remember 0.3.0, gulp-rename 1.2.2] We’re using gulp as a build tool and gulp-cached together with gulp-remember to allow fast incremental rebuilds. Part of the files under build have to be moved to a different output directory and this has to happen in-stream (…

Running a shell command from gulp

I would like to run a shell command from gulp, using gulp-shell. I see the following idiom being used the gulpfile. Is this the idiomatic way to run a command from a gulp task? Answer gulp-shell has been blacklisted. You should use gulp-exec instead, which has also a better documentation. For your case it act…

console.log to stdout on gulp events

I want to log to stdout (the config environment) when a gulp task is running or has run. Something like this: I am not sure what event I should be responding to or where to find a list of these. Any pointers? Many thanks. Answer (In December 2017, the gulp-util module, which provided logging, was deprecated. …