gulp

Gulp BrowserSync showing “reloading browsers” in Terminal, but not reloading the actual browser.

删除回忆录丶 提交于 2019-12-14 03:55:07
问题 I'm having an issue where my tasks are running as desired and BrowserSync seems to be working, but the actual browser isn't reloading. I'm getting the right messages in my Terminal to suggest everything is working as planned. I'm using MAMP for my local server which is serving a Wordpress build. I'm using Chrome v65 on a Mac. My gulpfile is below with a screenshot of my Terminal. Any ideas what might be causing this issue? // ===================================================================

Error: Task requires a name at Gulp.Orchestrator.add

别说谁变了你拦得住时间么 提交于 2019-12-14 03:48:53
问题 I am building a Node Web App and testing it locally on Windows 10. At some point since my last successful run, this node module orchestrator seems to have been installed, presumably as some dependency. Now I am getting this error. What is causing this and how do I fix it? C:\Users\George\Source\Repos\MakeSensePortal>gulp [23:02:53] Requiring external module babel-register C:\Users\George\Source\Repos\MakeSensePortal\node_modules\orchestrator\index.js:37 throw new Error('Task requires a name')

Gulp: Synchronicity without dependency

给你一囗甜甜゛ 提交于 2019-12-14 03:48:13
问题 I'm migrating my build system over to gulp, and have encountered a problem: I have defined various build tasks ( scripts , style , jade , etc), as well as a clean task that removes all of the built files. I want to make sure that the build tasks don't run before the clean tasks, BUT I also want to be able to run the build tasks without cleaning first. i.e. I want: gulp.task('build', ['clean', 'scripts', 'style', 'jade']); To only start running scripts , style and jade after clean has finished

How to debug Javascript in webstorm when gulp is serving the application

流过昼夜 提交于 2019-12-14 00:46:29
问题 In Webstorm, I am running gulp serve task that launches localhost:9000 stub angular project generated with yo. I am trying to debug JavaScript code and this is what i have tried: I run gulp as a debug task, I can only debug gulp file lines I try to run gulp serve before JavaScript, it starts serving and Webstorm never gets to launching its JavaScript debug session I try to run JavaScript debug, I don't get breakpoints inside my code. What is the workflow in this situation? PS. i am not trying

Gulp + Browserify task not working (no output)

折月煮酒 提交于 2019-12-13 21:35:27
问题 I have the following task on my gulpfile.js gulp.task('default', ['browserify']) gulp.task('browserify', function () { return browserify('./public/js/x.js') .bundle() .pipe(source('y.js')) .pipe(gulp.dest('./public/dist/js')) }) But after running $ gulp it gives no output. Am I missing something? 回答1: I am not sure what your browserify is but I'm gonna assume it's not the deprecated gulp-browserify . This should work. I tested it: var gulp = require('gulp'); var browserify = require(

Compass Line Number Comments Not Showing Up with Gulp

我的梦境 提交于 2019-12-13 19:33:09
问题 I am attempting to make the switch from GruntJS to Gulp and have run into a problem with my Gulp task for processing my SASS files via Compass. The files compile just fine into the single CSS file as they did under my GruntJS implementation, but I am missing the line number comments that show me where the CSS rules come from such as: /* line 26, ../_components/sass/_base.scss */ The code from my gulpfile.js for the task is: gulp.task('compass', function() { gulp.src(sassSources) .pipe(compass

gulp.src() not reading required JSON file's array values

左心房为你撑大大i 提交于 2019-12-13 18:42:33
问题 I'm trying to get gulp.src() to stream files from an array, so I can use gulp-inject to write them to my index.html file. Listed below is my gulp.config.json file which will hold the file paths of the packages included in my project. { "vendorjs": [ "jquery/dist/jquery.min.js", "angular/angular.js", "ng-token-auth/dist/ng-token-auth.js", "angular-bootstrap/ui-bootstrap-tpls.min.js", "ngInfiniteScroll/build/ng-infinite-scroll.min.js", "js/vendor/angular-ui-tour.js", "spin.js/spin.js", "angular

gulp.src (glob-stream) positive glob after negative glob kills match

荒凉一梦 提交于 2019-12-13 18:42:19
问题 I was under the impression and also from looking at the code that the a positive glob would only be restricted by negative globs that come AFTER IT. So how comes that gulp.src([ '../WebContent/g/css/ng-client.css' ],{base: '../WebContent'}).pipe(using()) results in ng-client.css being listed. While gulp.src([ '!../WebContent/g/css/*', '../WebContent/g/css/ng-client.css' ],{base: '../WebContent'}).pipe(using()) does not list the same file? I want to figure out what is wrong with the way I am

Using gulp.src() to include all files EXCEPT js files NOT in 3rd party dir

喜你入骨 提交于 2019-12-13 18:12:58
问题 I am trying to copy all files EXCEPT js files that are not in the directory 3rd . This is what I was doing: return gulp.src([ 'src/**/*', '!src/**/*.js', // no js files from src 'src/**/3rd/*.js' // make sure to get 3rd party js files though ]) .pipe(gulp.dest('dist')); However this would not copy ANY js files :( 回答1: In gulp 3.x globs passed to gulp.src() are not evaluated in order. That means it is not possible to exclude a set of files and then reinclude a subset of the excluded files.

Run gulp task after NPM package install

北城以北 提交于 2019-12-13 17:18:44
问题 I've developed a small package that I'm serving from a github repo. It's basically a UI Library and it has only a SCSS file. my-ui-library -- src/styles.scss I would like that after the installation the package run itself a gulp task that compiles the CSS, and move it to other location. The desired output, after the gulp task is run, is something like this: my-ui-library -- src/styles.scss -- styles.scss I've included some scripts "scripts": { "postinstall": "gulp" } I can´t find the way to