gulp-watch

Gulp TypeError: Arguments to path.join must be strings

人盡茶涼 提交于 2019-12-17 10:24:49
问题 I have i problem with gulp-ruby-sass. When i try to run the watch task and change some .sass files it occurs error: TypeError: Arguments to path.join must be strings Here is my gulpfile.js var gulp = require('gulp'); var jade = require('gulp-jade'); var sass = require('gulp-ruby-sass'); var watch = require('gulp-watch'); gulp.task('sass', function() { return gulp.src('sass/*.sass') .pipe(sass()) .pipe(gulp.dest('./css')); }); gulp.task('watch', function() { gulp.watch('./sass/*.sass', ['sass'

Issue with task not executing when using gulp with run-sequence

做~自己de王妃 提交于 2019-12-13 07:40:43
问题 I am new to gulp and so I put a simple script together to 1) learn how gulp works and 2) improve my development workflow. The issue I am having is that if I set the runSequence task list to be in the order of jscs and then lint, the lint task does not get executed. However, if I reverse them, and run lint first, then jscs, both tasks execute successfully. After doing more tests, I'm certain that there is something about the way I am using jscs that is causing the problem, or there is an issue

gulp-assemble & gulp-watch not recompiling site when changes are made to data, includes or layouts

浪子不回头ぞ 提交于 2019-12-13 00:27:54
问题 I'm having issues using gulp-assemble with gulp-watch . I want gulp to watch the entire assemble source directory ( data , includes , layouts and pages ) and recompile the site when ever a file changes. I'm able to get this working correctly for pages , but gulp is not recompiling the site when changes are made to the data , includes or layouts files. I've added a watch task to the example gulpfile.js in the gulp-assemble repository: var gulp = require('gulp'); var htmlmin = require('gulp

Gulp with “NPM start” causes a blank page with the text: Cannot GET / when testing Locally

ⅰ亾dé卋堺 提交于 2019-12-12 01:44:36
问题 I've been following this tutorial Angular2, Bootstrap, Yeoman, Gulp, tutorial and I get up to the frontend task section, but then something happens when I try to test the code locally. Whenever I use npm start I run the following code, but end up getting the blank webpage with Cannot GET/ Folder Structure: > my-vzlr > -build > -node_modules > -src > --app > ---app.js > ---index.html > ---main.js > --electron > --fonts > --images > --styles > -gulpfile.js > -package.json Package.json: > {

Run gulp watch command forever

走远了吗. 提交于 2019-12-12 01:27:19
问题 gulp.task('css', function () { gulp.src('custom_css/sass/style.scss') .pipe(sass({ style: 'compressed' })) .pipe(gulp.dest('./public/css/')); }); gulp.task('watch', function() { gulp.watch('custom_css/sass/style.scss', ['css']); }); gulp.task('default', ['css','watch']); this is my gulp script code. when I run gulp in the terminal it start watching for changes, auto compile sass file, but it stop watching if I closed the terminal window. I have also used gulp & to run it in background but not

Gulp4 watch no reaction to changes

℡╲_俬逩灬. 提交于 2019-12-11 19:37:52
问题 Migrating to Gulp 4 I encountered serious issues: no reaction to changes when using gulp.watch or gulp-watch. import gulp from 'gulp'; // import {get as browserSync} from 'browser-sync'; import watch from 'gulp-watch'; // const bs = browserSync('server'); var bSync = require('browser-sync').create(); gulp.task('browser-sync', function() { bSync.init({ server: { baseDir: "../" }, notify: true }); }); gulp.task('watch', gulp.parallel('browser-sync', ()=> { global.watch = true; gulp.watch('app/

Terminate gulp-watch task

微笑、不失礼 提交于 2019-12-11 03:19:11
问题 I want my gulp watch task to run only once, then stop watching. Now, if I run 'gulp' from the command line, the watch tasks keeps the gulp task running. I have to hit Ctrl-C to stop it. 回答1: when you run gulp watch, it will keep watching for file changes until you cancel it with CTRL-C. I you do not want this, then you can make a separate gulp task to do your building. You would have 2 tasks then: gulp watch and gulp build. As the build wouldn't run the watch task, it will stop when finished.

Skipping Tasks Listed as Dependencies in Gulp

a 夏天 提交于 2019-12-10 16:33:56
问题 I have looked all over the documentation and NPM to try to find a solution to this, but I have had no luck. I would like to have the option to skip the tasks that I list as dependencies when running a specific task. For example, if I have the following: gulp.task('prerun', function(){ // do cleaning, installation, etc. }); gulp.task('run', ['prerun'], function(){ // do stuff }); gulp.task('watch', function(){ gulp.watch('glob/glob/**', ['run']); }); I would like to be able to have my gulp

gulp.watch() not working with ftp update

[亡魂溺海] 提交于 2019-12-10 15:58:44
问题 I have recently learnt gulp and scripted this gulp script on my local computer, so that it can watch for any changes, and compile my javascripts (in this case, ./js/main.js with its dependencies) into a single file ./js/bundle.js : var gulp = require('gulp'); // Plugins var jshint = require('gulp-jshint'); var browserify = require('gulp-browserify'); var rename = require('gulp-rename'); // Lint Task gulp.task('lint', function() { return gulp.src(['./js/**/*.js', '!./js/bundle.js']) .pipe

gulp command giving errors of modules can not find

泄露秘密 提交于 2019-12-10 13:46:20
问题 I am trying to set up the basic aurelia app on windows. I have followed instructions from: http://aurelia.io/get-started.html, which includes: Installed node js Installed the gulp using: npm install -g gulp Installed jspn by using: npm install -g jspm Then downloaded the sample source code from https://github.com/aurelia/skeleton-navigation/releases to the project folder. Opened a console and changed to project directory ie. navigation-app Executed the command : npm install Executed the