Comments (4)
@xlc I have not used that plugin before. Can you describe the problems you're having and what you've tried?
from gulp-remember.
This is part of my existing gulp task
var $ = require('gulp-load-plugins')();
return gulp.src('src/**/*.js')
.pipe($.sourcemaps.init()) // enable source map
.pipe($.if(!options.debug, $.ngAnnotate())) // process js files
.pipe($.if(!options.debug, $.uglify()))
.pipe($.concat('script.js')) // concat all of them into one
.pipe($.sourcemaps.write('.')) // and produce one sourcemap
.pipe(gulp.dest(options.dist));
I don't want to reprocess all js files with ngAnnotate
and uglify
even only one of them changed.
I will like this
return gulp.src('src/**/*.js')
.pipe($.sourcemaps.init()) // enable source map
.pipe($.cached()) // only pass changed files
.pipe($.if(!options.debug, $.ngAnnotate())) // process js files
.pipe($.if(!options.debug, $.uglify()))
.pipe($.remember()) // get all files
.pipe($.concat('script.js')) // concat all of them into one
.pipe($.sourcemaps.write('.')) // and produce one sourcemap
.pipe(gulp.dest(options.dist));
But I think this require gulp-cached and gulp-remember support gulp-sourcemaps in order to work.
from gulp-remember.
I'm sorry, I don't quite follow. What is the problem you're seeing? What about the sourcemap plugin is not working when you use gulp-remember?
from gulp-remember.
I believe that this issue is similar to this:
function getApplicationJSStream() {
return gulp.src([
path.join(conf.paths.src, '/javascripts/angular/**/*.js'),
path.join(conf.paths.tmp, '/templateCacheHtml.js'),
path.join(conf.paths.src, '/javascripts/angular-app.js')
])
.pipe($.eslint())
.pipe($.eslint.format())
.pipe($.sourcemaps.init())
.pipe($.cached('appJS'))
.pipe($.uglify())
.pipe($.remember('appJS'))
.pipe($.order([
"**/module.js",
'templateCacheHtml.js',
"!angular-app.js",
"angular-app.js"
]))
.pipe($.concat('application.js'));
}
I use the cached/remember combination around uglify, after sourcemaps has been initialized. It only includes sourcemaps for files that changed and went through the uglifier, but wouldn't have the majority of the sourcemaps.
I do not yet have a solution but am playing around.
from gulp-remember.
Related Issues (15)
- Plugins which compile to different paths won't ever be removed from cache HOT 3
- Why use gulp-remember when there is gulp-cached? HOT 4
- Order issue, gulp-order not solving it HOT 1
- 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.