Questions tagged [gulp]
Gulp is a JavaScript build system, Node.js-based task runner like Grunt. Gulp uses streams and code-over-configuration for a simpler and more intuitive build process.
12,335
questions
-1
votes
1answer
14 views
Installing from NPM Gulp
On my task gulp, I try to use the installation of npm packages and use them according to the instructions. I did it with swiper
npm install swiper
After that, I tried to connect it according to one ...
0
votes
0answers
24 views
Gulp SyntaxError: Invalid or unexpected token
I just made an script to compile our scss when we save the file with gulp but I execute "gulp sass" I receive the next error:
gulp.task('sass', function () => {
...
0
votes
0answers
18 views
It seems gulp doesn't upload css folder to local production server - newbie in node and gulp
As the topic. In my app I have gulp task to create and send files to local server.
I work with GitHub repo clone; here's the original project
Problem:
in this app everything looks good, dist css ...
1
vote
0answers
17 views
nvm and gulp found on Visual Code terminal but not on linux terminal
I have Ubuntu LTS 20.04 running on wsl2 in Windows, this way I'm able to compile my JS/React code and run my php server in linux and use windows to code using Visual Studio Code.
This is running great,...
0
votes
0answers
7 views
Gulp resume task on error? Is this possible
This is my task
export default function glsl() {
return src(conf["glsl"])
.pipe(plumber({ errorHandler: false}))
.pipe(bytediff.start())
// Minify the file
.pipe(glslmin())
...
0
votes
1answer
20 views
Gulpfile: How to compile each SCSS into separate CSS with same name but with additional common styles
First of all I'd like you guys to be gentle. I haven't been coding much in recent year and since gulp update when then changed syntax to writing functions and exporting I somehow made it work then and ...
0
votes
1answer
15 views
Why MD5 hashing is being frequently used for preventing of loading of outdated CSS, JavaScript and media files?
I understand why we need to make the names of CSS, JavaScript and media files like images unique when building the project for production. I don't understand why the using of MD5 for this effect ...
0
votes
0answers
10 views
I would like my gulpfile.js to minify my CSS and Images
Here is my package.json file
{
"name": "pet-shop-frontend",
"version": "1.0.0",
"description": "Webucator Final Project",
&...
0
votes
0answers
8 views
building sass and cache bust
Im a little stuck here. I use https://github.com/nmrugg/gulp-hash-src for cache busting.
And there is a md5 hash added in my html file after I run "gulp css" for the first time.
The problem ...
0
votes
0answers
8 views
gulp Two task in one file js
I have two arrays and I want to merge them in one scripts.js
gulp.task('task1', function () {
return gulp.src(libraries_scripts)
.pipe(concat("scripts.js"))
.pipe(uglify()...
-1
votes
0answers
5 views
Tests failure during gulp test [closed]
I am running gulp test in node but I am getting plugin errors test cases failed with failure message econnrefused: connection refused. How to solve this?
PS I am very new to gulp and node
0
votes
0answers
39 views
How to run Javascript
I have a working Gulp script that I use to create my SVG sprites along with a preview page. But now I want to enrich the preview page, more precisely each icon in it, with information that I have in a ...
0
votes
0answers
16 views
SCSS not changing style.min.css (GULP)
Yesterday was ok, but this morning suddenly SCSS stopped connecting to a css file.
Code of gulpfile.js:
function styles() {
return src('app/scss/style.scss')
.pipe(scss({ outputStyle: '...
0
votes
0answers
9 views
Webp conversion is extremely slow on my gulpfile
So in this case on one of the templates I use to build sites, I've made a custom image compression and conversion process. I am not an expert on gulp so I am pretty sure something's not exactly as it ...
0
votes
0answers
8 views
Configuring gulpfile - Wrong path to detect change in CSS
I'm trying to configure my first gulpfile however I struggle with one problem.
I'm getting an error:
ENOTDIR: not a directory, stat '.../src/scss/main.scss/main.scss'.
Here's the function:
function ...
1
vote
0answers
15 views
Gulp sass suddenly stopped compiling changes
I was working on some scss, in a project that has a working environment with sass compiling and half way through editing a sass file I noticed the changes stopped being compiled. There are no sass ...
0
votes
0answers
8 views
Copy specific file in gulp js
I,m new in the world of gulp/node.
I want to copy only main.min.js from './template/js' folder and put it into the ./build/js folder
But it generates both of the .js files from '/template/js'.
I ...
0
votes
1answer
29 views
Drone CI can't find Node module that's 100% definitely there
My project is a pretty simple website compiled with gulp.
Gulp does:
PostCSS -> CSS; and
Pug -> HTML; and
Some image resizing
Nothing too shocking. It runs on my machine. It runs on my other ...
0
votes
0answers
19 views
How to start gulp watch and node server.js with npm start
I made a simple website with gulp sass some while ago and now I'm trying to make a login system with node, express, mysql which I succeed on but I don't know how to combine node server and gulp sass ...
0
votes
0answers
16 views
How to keep tag caps after pug compilation gulp-pug?
I do:
#app
myVueComponentName
expecting:
<div id="app">
<myVueComponentName></myVueComponentName>
</div>
but in fact:
<div id="app">
<...
0
votes
0answers
19 views
Could i put into gulp.src file by manually?
I am making a custom react build system using gulp.
I success to transpile with gulp assign single file path.
gulp
.src(targetPath)
.pipe(gulpPlumber())
.pipe(gulpSourcemap....
0
votes
0answers
10 views
Is there an automatic way to find out which of my many `await` s are taking too long?
Async profiling: My NodeJs code has about 200 instances of the use of await, and it is very slow. Is there a systematically way to find out how long each await took, and to find which of them is ...
0
votes
0answers
15 views
Using gulp-uncss with gulp-inline-source
I'm trying to reduce the css on my website to just what is needed per page and inline it into the html page. However I can't get it to work.
I'm trying to use the 'handler' option in gulp-inline-...
1
vote
1answer
21 views
Combining new apostrophe-cms project with existing Gulp.js project
I recently found out about Apostrophe CMS when I was searching for a Wordpress/TYPO 3 alternative and I must say, I'm really impressed! Needless to say, I'm also a bit overwhelmed with all the stuff ...
0
votes
0answers
16 views
Gulp watch not working when re-creating folder
Let's say I have the following gulp task:
const {watch, series} = require('gulp');
module.exports = (tasks) =>
function(done) {
watch('blocks/**/*.js', series(tasks.js));
done()...
0
votes
1answer
12 views
Gulp function to create a file with contents
I'm pretty new to gulp and trying to figure out if it's possible to write a gulp function that creates a file for me, with some content, and places the files in a location. But I'm trying to create ...
0
votes
1answer
7 views
Refused to apply style because of MIME-type error
I ran into a problem with applying stylesheet to my page in Node.JS project. I have a
app.use(express.static(__dirname + '/public'));
line in my app.js file, as well as public folder in the root of ...
0
votes
0answers
20 views
How to split a Gulp stream into multiple streams in a Custom plugin
I am working on a plugin for gulp that will take a single stream and split that stream into multiple streams.
// gulpfile.js
return src('./packages/*/src.js')
.pipe(makeBundles(['cjs', 'esm', '...
0
votes
0answers
9 views
sass watch not working in gulp to convert scss to css
This is my gulpfile code:
'use strict';
var gulp = require('gulp'),
sass = require('gulp-sass'),
browserSync = require('browser-sync');
gulp.task('sass', function() {
return gulp.src('./...
0
votes
0answers
15 views
VS Code: How do I map paths to debug in Chrome when using browserify?
I am having trouble accessing the original source mapped *.js files in VS Code. Currently, when debugging, I can only set breakpoints in Chrome and get them sent to a pseudo-js file in VS Code.
The ...
0
votes
0answers
10 views
Close self-closing html tags like img, meta, etc after gulp-inline-css in pipe
I have a gulp task to automate the layout of html emails for mailing. I want to use gulp-inline-css in that task. According to the terms of reference, it is necessary to use " / " for self-...
0
votes
0answers
11 views
BrowserSync - can't GET related images
New to gulp and browser-sync. Set up watch task and bowser-sync as noted below. Page refreshes HTML just fine, but I'm getting errors for any images referenced in HTML files.
Path Names
temp: {
...
0
votes
0answers
14 views
VS Code Debugger: How to Attach to Chrome Tab served by browser-sync?
I am having trouble finding a solution for running the VS Code integrated Debugger with Browser-Sync. Instead of launching chrome with the VS Code Debugger, my current launch.json looks like this:
...
1
vote
0answers
17 views
How to install gulp-sass-glob
When I am trying to save scss files which are imported to main sccs file - every time I need resave main scss file to apply changes. therefore I have decided to install gulp-sass-glob according to ...
0
votes
0answers
8 views
Gulp: Getting `Task function must be specified` error but I only have 1 task
I am trying to run the following task:
gulp.task('sass', function() {
return gulp.src(config.SCSS +'/*.scss')
.pipe(sass())
.pipe(gulp.dest(config.CSS))
});
But I get the error ...
1
vote
1answer
15 views
Can two SASS projects share the same node_modules folder and package,json file?
I am working on two SCSS projects that share identical dependencies (Bootstrap, Fontawesome, node.js). I would like to maintain the identical dependencies at the root and move the gulpfile.js to ...
0
votes
0answers
6 views
Drupal 3rd party library being overwritten by webpack bundle
I am working on a Drupal site that is legacy and uses an older version of lodash (2.2) which is implemented using the Libraries API (the source is placed in sites/all/libraries).
Recently we added a ...
0
votes
0answers
11 views
Generate random name or prevent from rename when using gulp-sass for compile and minify sass files
Assume that i have these below sass files:
app.scss:
.tutorial {
position: absolute;
left: -40px;
animation: left-right 1s infinite linear;
}
@keyframes left-right {
0% {
right: -40px;
}...
0
votes
0answers
13 views
update to glup 4 with node 12
i'm trying to update a projecjt with gulp 3 to gulp 4 (node 12)
i've got this error (below the full output)
> node-gyp rebuild
bufferutil.cc
win_delay_load_hook.cc
..\src\bufferutil.cc(25): ...
1
vote
0answers
25 views
gulp concatenate multiple js files but dependency path cause error
I am using Nodejs- v12.9.0 & gulp-4.0.2
I am concatenating all my js files from root & src directory in to a single file dist/src/allJs.js.
Problem: the dependent modules are not being ...
0
votes
1answer
29 views
gulp-4 concate multiple js files into one: Error Identifier has already been defined
I am using Nodejs- v12.9.0 & gulp-4.0.2
I want to concatenate & minify multiple js files from different src directories and bundle then into a single JS file.
It does concatenate, minify & ...
0
votes
0answers
25 views
+50
gulp4 - cannot compile Vue app with AG Grid Vue
It seems that Gulp JS, maybe likely Babel is not compatible with ag-grid-vue. Whenever I try to compile 1 get this error:
import { Component, Prop, Vue } from 'vue-property-decorator';
^
ParseError: '...
0
votes
0answers
18 views
gulp-notifier TypeError
Running a fresh gulp 4.0.2 version locally. Everything else seems to work (scripts and css compile), but the following error is thrown:
gulp-notify: [Error in notifier] TypeError in plugin "gulp-...
0
votes
1answer
19 views
Add self-closing tags using juicePreserveTags options within an MJML Gulp task
I'm using a clone of the git Repo: https://github.com/jpagano/mjml-starter-base
How can I add the configuration options found here https://www.gitmemory.com/issue/mjmlio/mjml/1528/467101657
config....
0
votes
0answers
10 views
Error running gulp task 'compile-ts'. See Warnings for details in visual studio 2019
I have the gulp package installed and it is at this place C:\Users\user\AppData\Roaming\npm\node_modules but in my visual studio 2019 I get the below error and the solution fails to build.
Error ...
0
votes
2answers
32 views
Mobile menu enlarging whole site in HTML
I'm making my first site with gulp.
I'm working with a mobile menu. When I click it, I want it to translate to the right. It works fine.
The problem is that when it goes right it enlarges the whole ...
0
votes
0answers
33 views
laravel elixir gulp task function must be specified
In my Laravel project, i use :
node 14.15.3
npm 6.14.9
gulp :
CLI version: 2.3.0
Local version: 4.0.2
my gulpfile.js
let elixir = require('laravel-elixir');
require('laravel-elixir-livereload');
...
0
votes
1answer
33 views
Gulp watch not watching .js files
Just went back to a very old project and updated to Gulp 4.0.2.
Managed to get it watching and compiling css, but doesn't seem to watch changes to the JavaScript files?
It doesn't throw any errors, ...
0
votes
1answer
55 views
How to inject css into browserSync using gulp 4 with predefined tasks?
I am writing an automation tool for myself, which has similar concept to laravel mix. I have a tiny problem that I can't crack when injecting sass into browsersync using Gulp 4. The following exports ...
0
votes
0answers
16 views
'use strict' is unnecessary inside of modules strict
I build my react project using gulp and gulp-babel. I get this warning
'use strict' is unnecessary inside of modules strict.
My babel preset:
{
"presets": ["@babel/preset-env", &...