Closed tsarapke closed 8 years ago
Hmm... I found solution, but I don't understand why previous solution not works properly. Here what I have done:
gulp.task('html', function() {
return gulp.src(path.join(config.root.src, config.html.src, config.html.files))
.pipe(gulpSwig({data: data}))
.pipe(gulpUseref({},
lazypipe().pipe(
function() {
return gulpIf(minCondition('js'), gulpUglify());
}
))
)
.pipe(gulp.dest(config.root.dist));
I hope that it will help for people who met a similar problem and they couldn't find solution.
Closing.
I have following html code:
And following task:
Actually, it's works well, but with one minus: when I've got results as
vendor.js
andapp.js
, i have a copy ofapp.js
insidevendor.js
before other scripts.Or, if i change task to follow:
Then i will have a concatenated content of
app.js
withvendor.js
insideapp.js
andvendor.js
(i.e. duplicating)Have you any suggestion? Thanks.