Comments (1)
- Your call to
order()
needs to go after yourcoffeeFilter.restore()
, otherwise it is ordering only coffee files. - Your
order(...)
uses thesrc
array as ordering instructions which hard-codeda.coffee
. By the time gulp gets there, the path of the coffee file has changed toresources/assets/scripts/util/a.js
, sogulp-order
doesn't find it. - Use
gulp-debug
to find out what the files look like at a given step. E.g..pipe(debug())
.
(FYI this doesn't have anything to do with gulp-remember
.)
Here is one working solution:
'use strict';
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
gulp.task('js', function (callback) {
var coffeeFilter = $.filter(['**/*.coffee']);
var src = [
'resources/assets/bower/jquery/dist/jquery.min.js',
'resources/assets/bower/jquery-migrate/jquery-migrate.min.js',
'resources/assets/scripts/util/a.*', // don't hard-code .coffee
'resources/assets/scripts/b.js'
];
var destName = 'scripts.js';
var dest = 'public/assets';
return gulp.src(src)
.pipe(coffeeFilter)
.pipe($.cached('coffee'))
.pipe($.coffee())
.pipe($.remember('coffee'))
.pipe(coffeeFilter.restore())
.pipe($.order(src, { base: process.cwd() })) // order after removing coffee filter
.pipe($.concat(destName))
.pipe(gulp.dest(dest));
});
from gulp-remember.
Related Issues (15)
- Plugins which compile to different paths won't ever be removed from cache HOT 3
- How to use this with gulp-sourcemaps? HOT 4
- Why use gulp-remember when there is gulp-cached? HOT 4
- Adds file back to the stream with wrong path (i.e. path changes that happened after gulp-remember are already applied) HOT 4
- After remembering() files are out of order from their original gulp.src HOT 2
- Letter case HOT 5
- Weird behavior - Forgets source Jade files replacing them with compiled HTML HOT 2
- Not piping what passed through, but piping destination files HOT 2
- Checking for changes accross teams HOT 1
- It does not handle files added and removed after run tasks HOT 1
- remember seems to cache HOT 1
- Replace deprecated dependency gulp-util HOT 1
- Strange Behavior on Gulp Remember HOT 4
- expose `caches` to module user HOT 12
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-remember.