Open bustbr opened 7 years ago
Hi,
I'd like to find out what's stopping this pull request from being merged into upstream. I understand that another approach, instead of supplying a static map, would be to allow "extras" to be a function, like requested in this issue https://github.com/tschaub/gulp-newer/issues/48
I need this feature for a project and I'd love to have it be part of the main repository, not only in a fork of mine I'd have to keep up to date if any features are added to gulp-newer.
Thanks in advance.
@bustbr, Hello. Not working :(
let src = [
'src/core/styles/**/[^_]*.styl',
'src/vendor/styles/**/[^_]*.styl'
];
return gulp.src(src, {cwd: config.root}) //src/core/styles/styles.styl
.pipe(newer({
dest: config.dest.css,
ext : '.css',
dependencyMap: {
'src/core/styles/styles.styl': [
'src/blocks/header/default/styles/style.styl',
//or 'src/blocks/*/*/styles/style.styl',
]
}
//extra: '!src/core/styles/styles.styl'
}))
//....
This feature allows to specify extra dependencies of files, much like the
extra
option, but instead of a single array (or string or glob), which is mostly useful when generating only a single output file, the map feature allows a gulp task to rebuild only the necessary files even in a many:many situation.