Questions tagged [gulp]

1

votes
1

answer
40

Views

Missing Gulp Events in 4.0

In Gulp 3.x there was the ability to tie into its event system with Orchestrator to do things when a task starts or a task ends by using the task_start, task_stop or stop listeners. Example: gulp.on('task_start', (e) => { // Task event information console.log(e); }); It seems Gulp has removed Orches...
Miura-shi
1

votes
0

answer
6

Views

Light Gulp 4 task still throwing 'async completion' error

I've not used Gulp before, so I'm not migrating an old gulpfile to Gulp 4. I'm just trying to get a few basic tasks set up. However, regardless of the method I use to signal async completion as well documented in this post I still get the 'Did you forget to signal async completion?' error. 'use stri...
webermn15
1

votes
2

answer
977

Views

gulp sourcemap is created but not working

Styles styles.less @import 'one.less'; @import 'two.less'; one.less body { background:red; } two.less body { font-size: 12px; } Gulpfile.js var gulp = require('gulp'); var less = require('gulp-less'); var sourcemaps = require('gulp-sourcemaps'); gulp.src('./src/assets/less/styles.less') .pipe(less()...
user3800799
1

votes
1

answer
426

Views

NPM Packages (with CLI) installed globally return command not found

I've had this happen twice to me before. The first time I assumed it was an error with NPM, so I uninstalled Node & NPM and didn't use the package that was giving me an error. I did a fresh install & began working on another project. I'd installed the package (and the version of it with cli). The c...
Noah Manion
1

votes
1

answer
803

Views

How use Dropzone in my Laravel app with Gulp / Require?

I have a Laravel app and I will use an external javascript library, DropzoneJS. I use Gulp for generating 1 single app.js file. This is my simple gulpfile.js: // gulpfile.js var elixir = require('laravel-elixir'); require('laravel-elixir-webpack'); elixir(function(mix) { mix.webpack('app.js'); }...
angelique000
1

votes
1

answer
92

Views

Divide gulp-file into several files

I want to divide one big gulp-file into several files. Some of this files is supposed to contain gulp-tasks, others – raw functions, third files – both. How can I do it? I've tried to create directory with a few files, some like that: gulpfile.js gulp/ ├── css_tasks.js └── js_tasks.j...
1

votes
1

answer
241

Views

Gulp restart the server when i changed my front end(Angularjs) controller file

I have this gulpfile.js // Dependencies var gulp = require('gulp'); var nodemon = require('gulp-nodemon'); // var notify = require('gulp-notify'); var livereload = require('gulp-livereload'); // Task gulp.task('default', function () { // listen for changes livereload.listen(); // configure nodemon n...
Mohamed Sameer
1

votes
0

answer
680

Views

File not found with singular glob \.tmp\templateCacheHtml.js

I am getting the following error when i build the file using gulp build. but gulp serve works fine without any errors. I am getting the error like (node:7144) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: File not found with singular glob: .tmp\templateCach...
satheesh
1

votes
1

answer
345

Views

How I replace values in HTML attributes via config.json file with Gulp?

Let's say I have a JSON file with the pairs: { 'Table':{ 'fullwidth': '680', 'color': '#33d025', 'margin1': '30', 'margin2': '60', 'padding': '20' } } then, I want to read those values and use them to replace attributes in an html file that looks like this: So, with the html file in a 'temp/' path,...
Billeeb
1

votes
0

answer
76

Views

nested dependency of npm package broke everything

I've picked up a project that I didn't touch for more than a month and when trying to deploy I found the build was failing. I can replicate the error locally. The project worked fine a month ago, no (direct) dependencies have been updated since then. My simple question is: is there any way to narrow...
Mr Peach
1

votes
0

answer
212

Views

Protractor Map or Filter function on a table which is having repeater with inside div elements

Below is the html for a table with repeater> div> a> span. How I can work with filter or Map function to get the compare the second column value i.e idea = ideaOne + ideaTwo + ideaThree + ideaFour along with first column value in loop as this is an anchor tag. Also what would be the proper way to d...
tyaga001
1

votes
1

answer
161

Views

Foundation 6 js gulp setup Can't find variable: define and require

I am getting this error ReferenceError: Can't find variable: define from Modernizr and ReferenceError: Can't find variable: require from Foundation.js This is the first time I use Foundation 6 sass and I don't know what is causing the error. The sass is working but js is not Is the info enough or...
Moaz Mabrok
1

votes
1

answer
51

Views

How to use gulp to run SASS transpiling?

I am new to gulp and want to use it to convert SASS to CSS. I have a src folder which has some scss files deep inside, and I want to mirror it to the public folder but as css files. This it the gulp code var gulp = require('gulp'); var sass = require('gulp-sass'); gulp.task('styles', function() { gu...
omega
1

votes
1

answer
1.3k

Views

How to add gulp to reactjs?

I followed a tutorial: http://jpsierens.com/tutorial-javascript-es6-babelv6/ . Tutorial githubrepo: https://github.com/jpsierens/es6-babel6 Can anyone help me with following questions? I created basic react app using create-reat-app boilerplate and added bablerc and gulpfile.js when i am trying to r...
DadyByte
1

votes
0

answer
154

Views

Unable connect to page. Browserstack

I use protractor with Browserstack.exe for e2e (UI) testing. I have to check authorization proccess. It goes in this way: go to domain/#login redirect to auth0.com to get authorized (hosted auth0 authorization) enter credentials redirect to my angular client with finished authentification. I read th...
pavel
1

votes
1

answer
270

Views

How to generate coverage report through gulp task in Angular 4?

I have tried so many plugins for writing gulp task to generate coverage report in Angular 4 but no-one was working. All documentation is for javascript files and in angular 4 we have typescript files. Once I tried converting all my ts files to js files using gulp typescript and then passed those jav...
arcticOak2
1

votes
0

answer
112

Views

Karma not running any unit test cases

I am trying to set up Karma for a small demo project. The problem is that Karma is not executing any test cases. My project has only two .js files: app/js/app.js and test/spec/app.spec.js My karma config file is as follows: module.exports = function(config) { config.set({ basePath: '', frameworks: [...
aryan87
1

votes
0

answer
67

Views

Gulp - Make multiple copies of a file based on an array

I have an array of strings (['red', 'green', 'blue']), and I want my Gulp stream for certain files to individually process and clone files into folders based on the strings. My source file tree in ./src/stylus/ looks like this: style.styl util.styl themes/basic.styl themes/advanced.styl After Gulp h...
Emphram Stavanger
1

votes
0

answer
88

Views

Svg sprite icons showing line or artifact on my application

Can anybody help with sprite icons, something wired line or artifact is showing on icons and when i give shape and spacing (padding 1) for sprite icons the icons totally disappears and if i give shape and spacing (padding 0.5) i can see icons but the line does not disappears. please help me out with...
Rajesh Dumpeti
1

votes
1

answer
130

Views

Which gulp package(s) will minify anything within a html file?

I have a project where I work in a html file. When running gulp, need to minify the html and inline scripts if any, and then copy and rename with the extension .php. Which gulp packages are required for these tasks? Right now I'm using: gulp-htmlmin gulp-rename and it works, except that inline don'...
Meek
1

votes
0

answer
152

Views

Gulp watch stop after I install run-sequence

I used to have 'gulp watch' working fine. My 'gulp watch' no longer run after I do npm install run-sequence. Running gulp work fines. It looks like any filesystem change never trigger 'gulp watch' for run. Below are my gulpfile and NPM packages. I used to have 'gulp watch' working fine. My 'gulp...
user1187968
1

votes
1

answer
112

Views

AngularJS module and controller in different files

I would like to move my controllers to it's own files while having module configuration file in separate file For now I have this code: # Module part voucherModule = angular.module( 'Backoffice.Vouchers' [ 'Core.Repository.Voucher' 'ui.router' ] ) voucherModule.config ($stateProvider) -> $stateProvi...
Justinas
1

votes
0

answer
14

Views

gulpjs many src and many dest files .less

This is structure of my folders: -content --1 ---assets ----css (here style.css after compiled style.less ----less (here style.less) --2 ---assets ----css (same as eg. 1) ----less (same as eg. 1) --3 ... here is my gulpfile.js const gulp = require('gulp'); const less = require('gulp-less'); const...
Bany Banan
1

votes
0

answer
300

Views

gulp-sass is very slow in gulp 4

After updating the gulp version to gulp 4, gulp-sass is taking much time to watch and compile scss. It was fast with gulp version 3.9.1. Gulp-sass version is 2.3.2. Is there any solution? Note: Removing the sourcemaps didn't help.
Fathima Linsa K
1

votes
0

answer
27

Views

Require() is undefined after transpiling with Babel?

This is my gulp task, and I have a few 'require()' statements in my source js file. Since I do Babel, why is my browser still saying 'require() is undefined' as it should recognize it? gulp.task('reduceSize', function() { return gulp.src(source) .pipe(concat('bundle.js')) .pipe(babel({ presets: ['en...
richardthefourth
1

votes
1

answer
279

Views

Sass compiling and browser-sync

I have this code for sass compiling: gulp.task('scss', function () { return gulp.src('./src/scss/**/*.scss') .pipe(scss().on('error', scss.logError)) .pipe(autoprefixer({ flexbox: true, grid: true, browsers: ['> 1%', 'last 5 years', 'Firefox > 20'] })) .pipe(gulp.dest('./src/styles')) .pipe(browserS...
Nat Davydova
1

votes
1

answer
49

Views

TypeError while running gulp. But can not find any TypeError is there any version issue of Node and npm?

My Gulp file was running Good but when I update the Node 6 to 8 it was throwing an error. To solve that error I revert back to Node 6. But after that, It showing 'TypeError dest.on is not a function' but I can't find any TypeError. Can anyone advise me what I've done wrong? Node version: 6.11.4 npm...
user2349171
1

votes
1

answer
33

Views

Express Handlebars Globbing

I'm trying to setup my express app so that it will read my all of my components as partials. My tree looks like: -src/ --components/ ---hero ---block What I want to is for my express-handlebars app engine to look in the components directory and then search the other directories for the partials, I'v...
Ashleystreet01
1

votes
0

answer
639

Views

Bundle node express.js app into one file and manage the require using gulp

I've been trying to bundle a rest api with node.js, express.js and mongoose into one file, nor browserify neither rollup worked for me, i keep having problems of dependencies that are not found as a module requires another, can someone help, even with a tutorial please? for exemple with browserify...
Youness Houdass
1

votes
1

answer
913

Views

error TS2307: Cannot find module '@microsoft/microsoft-graph-client'

I am very new to Typescript so I'm very sorry if this is obvious. Several hours of googling didn't solve it for me. I try to import the module @microsoft/microsoft-graph-client to my typescript, but it throws the following error: (3,37): error TS2307: Cannot find module '@microsoft/microsoft-graph-c...
steve1607
1

votes
1

answer
86

Views

Exclude folders from Gulp-Zip task foreach loop

I'm using gulp-zip and gulp for-each to zip a number of folders. These contain other folders named _js, _css and _raw. I wish to exclude any folder beginning with an underscore from the output zipped files. gulp.task('zipAll', function(){ return gulp.src('src/*') .pipe(foreach(function(stream, fil...
jimbouton
1

votes
0

answer
31

Views

How to unit test the angularjs injector, outside of a controller?

As part of an AngualrJS app, I have to retrieve user details from a REST api before bootstrapping the application. var initInjector = angular.injector(['ng']); var $http = initInjector.get('$http'); $http.get('../api/user').then( function (response) { if (response.user.valid) { angular.bootstrap(doc...
Joseph McCarthy
1

votes
1

answer
505

Views

versioning css and js files using gulp

We are adding versions to css and js files to do cache busting. I have used gulp-rev-manifest and gulp-rev-collector to achieve this. But every time we do a build all the updated files with the new version number and have to be pushed to production which is not ideal. Is there any other way to do th...
lalitha
1

votes
2

answer
445

Views

Passing a variable between pipes in Gulp 3.9.1

Using gulp 3.9.1 I am attempting to return a bunch of files and perform a task that requires a var to be passed between two pipes. I'm using node uuid to create a v3 UUID for each file path to ultimately end up with a uuid for each page. I'm grabbing the file path with gulp-print. I want to store th...
Greg
1

votes
0

answer
39

Views

Troubleshoot CSS Sourcemap on Firefox 59

I'm using Firefox 59.0b5/64 bit on Win 10. On a new project, DevTools isn't recognizing the CSS sourcemap created with gulp-sourcemap. Sourcemaps created on earlier projects work fine in Firefox so I don't believe it's a Firefox settings issue, and sourcemaps in Chrome DevTools work fine on this pro...
Steve Clason
1

votes
0

answer
190

Views

ionic Gulpfile (or dependent module) not found

I'm trying to open a project that i downloaded from github.the project uses ionic 2 but it returns this error : [ERROR] Gulpfile (or dependent module) not found: .\gulpfile.js For custom Gulpfile locations, you can run ionic config set gulp.file . Otherwise, the default Ionic Gulpfile can be downloa...
bambo Growth
1

votes
2

answer
270

Views

Gulp to compile the scss files and move the css and css.map files to the parent folder relative to the scss file location

var gulp = require('gulp'); var sass = require('gulp-sass'); var sourcemaps = require('gulp-sourcemaps'); gulp.task('sass', function () { return gulp.src(['./project/**/*.scss', '!./project/**/_*/']) .pipe(sourcemaps.init()) .pipe(sass().on('error', sass.logError)) .pipe(sourcemaps.write('.')...
Vai Wood
1

votes
1

answer
101

Views

Exclude SVG from gulp-svg-sprite build process

I'm currently building an SVG Icon system using gulp-svg-sprite and have run into a situation where I need to exclude some icons from the build process. Is there a way to EXCLUDE an SVG from running through these 2 pipes? Somehow I need to get the src filename and compare it to the SVG I want to exc...
Ryan Belisle
1

votes
0

answer
69

Views

gulp - using symlink in task source

i have the following problem: i'm running gulp and one of the task is gulp.task('default', function() { return gulp.src([ 'requirements.txt', '**/symfile' '!**/node_modules/**/*']) .pipe(tar('prebuilt.tar')) .pipe(gzip()) .pipe(gulp.dest('build')); }); the symfile is a symbol link created with ln...
ddor254
1

votes
1

answer
272

Views

Getting an error using gulp

I'm picking up an error with gulp on Windows 10 Running gulp through git bash works fine, it opens the current project in a new browser tab, but the moment I alter the style.scss file, and save it in atom, this error comes up... [17:02:54] Starting 'css'... events.js:183 throw er; // Unhandled 'err...
Sle7en

View additional questions