Comments (4)
Try this:
gulp.task('new', function(callback) {
gulpSequence('clean:all', ['favicons:all', 'images', 'fonts', 'site', 'sass', 'javascript', 'metalsmith'], 'watch')(callback);
});
gulp.task('clean:all', function() {
return del(config.delete.build).then(function () {
return del(config.delete.deploy);
});
});
from gulp-sequence.
I am sorry, there were some really stupid errors. I forgot the return
statements. So no way of knowing for gulpSequence
that these tasks were completed:
gulp.task('revision', function () {
var revAll = new RevAll({
dontRenameFile: config.revision.ignore
});
return gulp.src(config.revision.src)
.pipe(revAll.revision())
.pipe(gulp.dest(config.revision.dest));
});
gulp.task('gzip', function() {
return gulp.src(config.gzip.src)
.pipe(gzip())
.pipe(gulp.dest(config.gzip.dest));
});
from gulp-sequence.
Perfect. This is fixing it. Thanks a lot.
from gulp-sequence.
I have a similar problem, so I do not open a new issue. I thought maybe you want to know. Each of the tasks work fine when started manually but only clean:deploy
and revision
are carried out when part of gulpSequence
:
// cleans deploy-directory, puts revisioned files into deploy-directory,
// deletes debug infos from deploy directory and gzips respective files
// in the deploy-directory
gulp.task('deploy', function(callback) {
gulpSequence('clean:deploy',
'revision',
'clean:debug',
'gzip')(callback);
});
// deletes deploy-diretory
gulp.task('clean:deploy', function() {
return del(config.delete.deploy);
});
// deletes debug infos from deploy-directory
gulp.task('clean:debug', function() {
return del(config.delete.debug);
});
// runs revision over all files from build directory and puts result into deploy directory
gulp.task('revision', function () {
var revAll = new RevAll({
dontRenameFile: config.revision.ignore
});
gulp.src(config.revision.src)
.pipe(revAll.revision())
.pipe(gulp.dest(config.revision.dest));
});
// gzip's most files in deploy-directory
gulp.task('gzip', function() {
gulp.src(config.gzip.src)
.pipe(gzip())
.pipe(gulp.dest(config.gzip.dest));
});
The reason is that the tasks clean:debug
and gzip
are started although the task revision
is not really finished yet writing the files and therefore they do not find files. Of course, I can find a workaround, but this seems to be a general issue and it would be nice if gulp-sequence
would handle it. What do you think?
from gulp-sequence.
Related Issues (13)
- TypeError: Object #<Object> has no method 'apply' HOT 7
- Doesn't appear to work with gulp.watch HOT 6
- Adding list dynamically to gulp sequence. HOT 1
- Replace deprecated dependency gulp-util
- npm install 出现了问题 HOT 2
- TypeError: gulp.on(...).start is not a function HOT 2
- macos 环境下报错 HOT 1
- TypeError: gulp.on(...).on(...).on(...).on(...).start is not a function
- Error: thunk already filled on subsequent run HOT 3
- dynamic params HOT 2
- Changes in 0.4.2 break some tasks HOT 4
- Differences between this and run-sequence HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gulp-sequence.