扫码关注官方订阅号
不想gulp把jQuery也给合并了,gulp-dom-src有这功能吗?
学习是最好的投资!
你可以结合gulp-filter
var jqFilter = filter('**/*.js', {restore: true}); gulp.task('js', function() { return domSrc({file:'index.html',selector:'script',attribute:'src'}) .pipe(jqFilter) .pipe(concat('app.full.min.js')) .pipe(uglify()) .pipe(gulp.dest('dist/')); });
当然gulp-dom-src也可以,你写一个复杂的selector就可以了script:not([src*="jquery"])
script:not([src*="jquery"])
微信扫码关注PHP中文网服务号
QQ扫码加入技术交流群
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
PHP学习
技术支持
返回顶部
你可以结合gulp-filter
当然gulp-dom-src也可以,你写一个复杂的selector就可以了
script:not([src*="jquery"])