Answer the question
In order to leave comments, you need to log in
Handling exactly the file that has changed ( Gulp )?
I use gulp and the ssh module to upload the project to the hosting.
Now, when a file is changed, all files are processed and sent to the hosting. (Example below)
I want the file that was changed to be processed and sent.
gulp = require "gulp"
coffee = require "gulp-coffee"
uglyfly = require "gulp-uglyfly"
sftp = require 'gulp-sftp'
gulp.task "s", [], ->
gulp.src ["dev/*.coffee", "dev/*/*.coffee"]
.pipe do coffee
.pipe sftp
host: '......'
remotePath: "/var/www/..."
user: '....'
pass: '.....'
.pipe gulp.dest "result"
gulp.task "watch", ->
gulp.watch ["dev/*.coffee", "dev/*/*.coffee"], ["s"]
gulp.task "default", ["s", "watch"]
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question