gulp-watch

Files could not be found in your workspace, or you do not have permission to access it

老子叫甜甜 提交于 2019-12-24 10:38:02
问题 I realize this question has been asked before, but I haven't found an answer that specifically addresses this issue. I'm using Visual Studio 2015 Update 3 on a project with Core 1 (MVC 6), Angular2 and the project is in TFS. I'm using Gulp-watch to copy html/css/js files over as I work on them and this works most of the time. I have most of wwwroot in my .tfignore file including my "app" folder where all those files are being copied/cleaned by gulp and gulp-watch. I know tfignore settings are

gulp-nunjucks-html + gulp-data not compiling on watch

£可爱£侵袭症+ 提交于 2019-12-23 02:06:12
问题 I've written a gulp task to take data from json files and process it as html. When I first run the build this works like a charm, however I've set up a watch task to also do this and although it will rebuild the nunjucks file into html, it seems to ignore the json until the next full build (even though all the watch does is run the same task) here is my task: // Process nunjucks html files (.nunjucks) gulp.task('nunjucks', function() { 'use strict'; return gulp.src('src/html/pages/**/*

gulp-nunjucks-html + gulp-data not compiling on watch

一个人想着一个人 提交于 2019-12-23 02:06:11
问题 I've written a gulp task to take data from json files and process it as html. When I first run the build this works like a charm, however I've set up a watch task to also do this and although it will rebuild the nunjucks file into html, it seems to ignore the json until the next full build (even though all the watch does is run the same task) here is my task: // Process nunjucks html files (.nunjucks) gulp.task('nunjucks', function() { 'use strict'; return gulp.src('src/html/pages/**/*

Gulp plugin for running a PHP server?

折月煮酒 提交于 2019-12-22 18:26:12
问题 I'm looking to transition over from grunt to gulp. However I'm not finding a way to serve PHP files with livereload support, such as gateway (https://www.npmjs.org/package/gateway) using mounts. Are ther any plugins out there for running/server PHP using a gulp task? 回答1: I asked totally the same question few weeks ago. I want to start a native PHP server under Gulp, because I like the syntax better than Grunt. I also want to use PHP just to include other HTML files. :) It turns out there is

GULP: Modify a watched file in place without causing an infinite loop

我只是一个虾纸丫 提交于 2019-12-21 19:59:05
问题 Im trying to use gulp and jscs to prevent code smell. I also want to use watch so that this happens when ever a change is made. The problem I'm running into is jscs is modify the source file that is being watched. This causes gulp to go into an infinite loop of jscs modifying the file and then watch seeing the change and firing off jscs again and again and again ... const gulp = require('gulp'); gulp.task('lint', function() { return gulp.src('/src/**/*.js') .pipe(jscs({ fix: true })) .pipe

Can I install just Gulp globally?

限于喜欢 提交于 2019-12-21 07:03:31
问题 I'm constantly working on new web development projects that don't ever, in practice, need their node_modules folder when deploying. It would suit me much more if I was just able to create a small gulpfile.js for each project, rather than 6000+ files contained in the node_modules folder for every project, that are only ever used by me on this machine. I only use Gulp to compile SASS and prefix and minify my CSS. I don't need to worry about any other type of deployment issues, but the

Gulp Error: watch ENOSPC

核能气质少年 提交于 2019-12-19 06:20:28
问题 Hi i'm getting this error while running gulp watch. im using vueify in laravel project. why is this happening. it was working fine all these days and this came in today. $ gulp watch [12:56:01] Using gulpfile ~/Documents/web_projects/next-home/gulpfile.js [12:56:01] Starting 'watch'... [12:56:01] Starting 'browserify'... Fetching Browserify Source Files... - resources/assets/js/app.js Saving To... - public/js/app.js [12:56:02] Finished 'browserify' after 707 ms [12:56:02] 'watch' errored

How can Gulp be restarted upon each Gulpfile change?

醉酒当歌 提交于 2019-12-18 10:02:14
问题 I am developing a Gulpfile . Can it be made to restart as soon as it changes? I am developing it in CoffeeScript. Can Gulp watch Gulpfile.coffee in order to restart when changes are saved? 回答1: You can create a task that will gulp.watch for gulpfile.js and simply spawn another gulp child_process. var gulp = require('gulp'), argv = require('yargs').argv, // for args parsing spawn = require('child_process').spawn; gulp.task('log', function() { console.log('CSSs has been changed'); }); gulp.task

How to Gulp-Watch Multiple files?

不想你离开。 提交于 2019-12-17 21:54:35
问题 I have something like this: gulp.task('default', ['css', 'browser-sync'] , function() { gulp.watch(['sass/**/*.scss', 'layouts/*.css'], function() { gulp.run('css'); }); }); but it does not work, because it watches two directories, the sass and the layouts directory for changes. How do I make it work, so that gulp watches anything that happens inside those directories? 回答1: gulp.task('default', ['css', 'browser-sync'] , function() { gulp.watch(['sass/**/*.scss', 'layouts/**/*.css'], ['css']);

gulp-watch in combination with gulp-less caching issue

孤街浪徒 提交于 2019-12-17 21:16:09
问题 I have the following setup: // watch for changes gulp.task('watch', function () { gulp.watch('./assets/**/*.less', ['compile-less']); }); gulp.task("compile-less", () => { return gulp.src('./assets/build-packages/*.less') .pipe($.less({ paths: [ $.path.join(__dirname, 'less', 'includes') ] })) .pipe(gulp.dest(OutputPath)); // ./dist/styles/ }); So basically every time a developer changes something in a less file it runs the task 'compile-less'. The task 'compile-less' builds our package less