我正在使用gulp构建我的开发工作流程。Gulp及其插件大量使用glob。
我对以下内容之间的区别感到困惑:
directory/
directory/*
directory/**
directory/**/*我不能让gulp做我想要的事情。
发布于 2014-09-15 05:27:40
Grunt很好地解释了globs的工作原理http://gruntjs.com/configuring-tasks#globbing-patterns
* matches any number of characters, but not /
** matches any number of characters, including /, as long as it's the only thing
in a path part. So a/**/b will match a/x/y/b, but a/**b will not.
directory/ = this isn't a glob and would evaluate as expected.
directory/* = will match anything in the directory, but not sub-directories.
directory/** = will match anything in the directory and all subdirectories.
directory/**/* = will match anything in the directory and all subdirectories.
(good for adding a prefix like an extension to the end)https://stackoverflow.com/questions/25829761
复制相似问题