简体   繁体   English

在Gulp中你如何否定多个项目,例如忽略文件和目录?

[英]In Gulp how do you negate multiple items e.g. ignore a file and a directory?

In Gulp how do you negate multiple items eg ignore a file and a directory? 在Gulp中你如何否定多个项目,例如忽略文件和目录?

I want to combine the following: 我想结合以下内容:

gulp.src(['./**/*.{css,js,gif,png,php,eot,svg,ttf,woff}', '!./src/**/*'])

gulp.src(['./**/*.{css,js,gif,png,php,eot,svg,ttf,woff}', '!./gulpfile.js'])

Just add them on to your list: 只需将它们添加到您的列表中:

gulp.src(['./**/*.{css,js,gif,png,php,eot,svg,ttf,woff}',
          '!./src/**/*',
          '!./gulpfile.js'])

You can have as many items in your glob list as you want. 您可以根据需要在glob列表中包含任意数量的项目。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在jade中添加脚本标记的属性,例如异步延迟 - how do you add attributes to script tag in jade e.g. async defer Flot chart:绘制图表后如何更改样式选项(例如,通过代码注入)? - Flot charts: How do you alter styling options after the chart's been rendered (e.g. by means of code injection)? 您如何在人力车中绘制24小时(例如23:01:35)作为y值的图表? - How do you graph 24 hour times (e.g., 23:01:35) , as y-values, in rickshaw? 如何使用gulp忽略文件? - How do I ignore a file using gulp? “选择框”(例如,在Finder中选择多个项目)的专有名词是什么? (反应) - What is the proper term for “selection boxes” (e.g. selecting multiple items in Finder)? (React) 如何根据外部条件(例如购买的物品数量)切换两个不同的按钮(功能/文本) - How to toggle two different buttons (function/text) based on external condition (e.g. num of items purchase) 如何更改图片在网页上的加载方式? (例如较低的分辨率) - How can you change how pictures load on webpages? (e.g. lower resolution) 如何检查2位小数? 例如2.2.10 - how to check 2 decimals? E.g. 2.2.10 如何在 a.css 文件中使用在 a.scss 文件中声明的变量(例如 $blueColor:#ffffff)? - How can I use variables declarated in a .scss file (e.g. $blueColor: #ffffff) in a .css file? 如何重用WordPress网站的一部分,例如页眉,页脚,多个WordPress网站的页眉的一部分? - How to reuse parts of WordPress site e.g. header, footer, part of header for multiple WordPress sites?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM