gulp


Get Gulp pipes of dependencies


I have a gulpfile with some tasks. All task are combined in a default task, that has dependencies to all others tasks. I want to add a deploy task. The deploy can take a list of files. I want only deploy changed files.
Is there a way to get the pipes of all dependencies? Or any other way, without merge everything into one task?
Here a simple sample to explain:
var gulp = require('gulp');
var concat = require('gulp-concat');
var debug = require('gulp-debug');
var newer = require('gulp-newer');
gulp.task('default', ['js', 'css']);
gulp.task('js', function () {
return gulp.src('./app/**/*.js')
.pipe(newer('./dist/app.js'))
.pipe(concat('app.js'))
.pipe(gulp.dest('./dist/'));
});
gulp.task('css', function () {
gulp.src('./app/**/*.css')
.pipe(newer('./dist/style.css'))
.pipe(concat('style.css'))
.pipe(gulp.dest('./dist/'));
});
gulp.task('deploy', ['default'], function () {
gulp.src('./dist/*')
// Here I want only files changed in dist
.pipe(debug());
});
Update:
Here some more of my task:
gulp.task('default', ['js', 'css', 'images', 'templates']);
gulp.task('images', function () {
return gulp.src('./app/images/*')
.pipe(newer('./dist/app/images'))
.pipe(gulp.dest('./dist/app/images'));
gulp.task('templates', function () {
return gulp.src('./app/**/*.html')
.pipe(newer('./dist/app/templates.js'))
.pipe(minifyHTML({ empty: true }))
.pipe(templateCache({ module: 'app' }))
.pipe(uglify())
.pipe(gulp.dest('./dist/app'));
I added a deployed folder, where i keep track of all files that a deployed.
var gulp = require('gulp');
var concat = require('gulp-concat');
var debug = require('gulp-debug');
var newer = require('gulp-newer');
gulp.task('default', ['js', 'css']);
gulp.task('js', function () {
return gulp.src('./app/**/*.js')
.pipe(newer('./dist/app.js'))
.pipe(concat('app.js'))
.pipe(gulp.dest('./dist/'));
});
gulp.task('css', function () {
gulp.src('./app/**/*.css')
.pipe(newer('./dist/style.css'))
.pipe(concat('style.css'))
.pipe(gulp.dest('./dist/'));
});
gulp.task('deploy', ['default'], function () {
gulp.src('./dist/*')
.pipe(newer('./deployed'))
.pipe(debug())
.pipe(gulp.dest('./deployed'))
});

Related Links

gulp-jshint utters errors when using browserify
Gulp “watch” is not running the sub task “sass” on file change
Proxy URL not working with BrowserSync Gulp task
the task can't be called by watch module.
I can't get the data-uri() function to work on gulp.js to base64 an image on mac
How to inject bower dependencies in karma.conf.js file with gulp?
Getting Libsass Gulp Susy to work together
Gulp compass without config.rb
gulp-webserver: Default to index.html if available, else show directories
gulp-uglify notify on failing build
Declaring optional dependencies
gulp html minification error
Can an IIFE be added to a browserify bundle?
Gulp: Error Messages and Notifications with Plumber
Gulp - gulp-load-plugins not working
How to configure Gulp task to copy bower resources

Categories

HOME
reactjs
airflow
jenkins-pipeline
openacc
casting
android-ndk
gap-system
singleton
squeak
coordinates
mailchimp
flowtype
browserstack
osx-yosemite
segmentation-fault
ios-universal-links
spring-data-solr
xmlhttprequest
mbed
repeater
luis
k-means
md2
civicrm
audio-streaming
lotusscript
connection-pooling
prepros
ecmascript-2017
aspxgridview
aws-certificate-manager
utc
angular2-changedetection
boosting
launchd
overflow
blockly
language-detection
favorites
epub
microstrategy
jsonapi-resources
dropdownbox
http-proxy
intersection
cocoa-scripting
pygraphviz
vpython
nshttpurlresponse
angular-fullstack
activeandroid
hdpi
enet
wink
gige-sdk
playframework-1.x
xamarin-test-cloud
chain
codesniffer
scrollmagic
cardview
msiexec
alarmmanager
init
avi
laterjs
window.location
stdlist
nugetgallery
trendline
apache2-module
ewam
yfiles
identifying
musicbrainz
jsoncpp
nmock
litedb
screen-lock
crtdbg.h
pysvn
uiblureffect
jsonschema2pojo
go-gin
disparity-mapping
msdropdown
xpand
banana-pi
rda
android-relativelayout
satisfiability
nop
maven-javadoc-plugin
thucydides
friendly-id
ia-32
record-locking
coinbase-php
mysql2
brew
system.transactions
blotter
setcookie
boost.build
dnsbl
nsregularexpression
big-endian
webpage-screenshot
erlide
diazo
stl-algorithm
inserthtml
digg
windows-xp-embedded
netduino
netbeans7.0
cinder
http-response-codes
newspeak
pkcs#7
data-formats
projectgen
bootstrap-protocol
scalable

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App