如题,
没有看到太详细的解释
追加说明:是在gulpfile里:
function getFilters() {
return {
css: filter(['**/*.css']),
less: filter(['**/*.less']),
js: filter(['**/*.js']),
coffee: filter(['**/*.coffee']),
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
LZ,gulpfile里面的**和*是node-glob提供的语法,而非正则表达式。
*Matches 0 or more characters in a single path portion**If a "globstar" is alone in a path portion, then it matches zero or more directories and subdirectories searching for matches. It does not crawl symlinked directories.下面两张图说明了一切:

一个 * 表示前面的表达式或一组表达式可以重复0次或N多次。
二个 ** 直接报错。