Comments (18)
这个等我把这个文档整理下: http://fex-team.github.io/fis3/docs/api/config-glob.html
我先大概说下:
/*.html
命中根目录下面的所有 html 为后缀的文件,但是不命中子目录的。
/**.html
命中根目录下面的所有 html 以及其子目录下面的所有 .html 文件。
xxxx/**/*.html
那么就是 xxxx 目录下面的子目录下面所有.html 文件,不包含xxxx 目录下面的。
xxxx/**.html
那么就是xxxx 目录下面所有 .html 包括子目录
*.html
因为没有限制与哪个目录, fis 里面会自动将他等价于 **/*.html
也就是所有目录下面的 html 文件。
from fis3.
fis.set('project.ignore', [
'publish/**/*',
//...
])
我的理解,上面这样才是忽略目录下的所有文件吧?为啥默认配置是
fis.set('project.ignore', [
'publish/**',
//...
])
这种写法呢
from fis3.
publish/**/*
public/a.js X
public/a/a.js √
public/b/b.js √
**
== {*,**/*}
public/a.js √
public/a/a.js √
public/b/b.js √
不过简写的 hack 确实理解起来很费劲,讨论下是否去除。
具体参考文档
http://fex-team.github.io/fis3/docs/api/config-glob.html
from fis3.
public/**
是表示下面所有的文件,而 public/**/*
显然多了一级目录,那么 public/xxxx 文件都不能 match 到,只能 match public 下面的子目录下面文件。
from fis3.
@2betop 整理一下这块的东西,讨论是否去除额外扩展。
from fis3.
晕啊,是我自己理解错了。额外扩展开了几遍,最后还是记混了,宁愿多谢字符,支持去除扩展。
from fis3.
那么 我要命中 public 下面所有的 js 后缀应该怎么写?
现在: /public/**.js
glob 原版 /public/{*.js,**/*.js}
from fis3.
我不确认我的理解是否正确,在 glob 里面 **
global star
是搭配目录用的,而不是搭配 文件用的,也就是说 /public/**.js
是没有任何意义,只有 /public/**/*.js
这里面的 **
global star
是有意义,代表 match n 个目录。既然 **.ext
没有意义,为何不扩展它,让它更简单?
from fis3.
@2betop 就如我跟你前面沟通,规范不清晰导致的混用。不理想,这块去除吧。
from fis3.
哪不清晰?
from fis3.
glob
* 当前目录文件
** 跨文件夹
**/* 跨文件夹下的文件
扩展
* 当前目录文件
** 跨文件夹
**/* 跨文件夹下的文件
** 当前文件夹文件+跨文件夹下的文件
这不重了吗?
from fis3.
对对,@2betop 大神初衷是好的,但是我会凌乱。。。(逃,
或者要不改成 ***
三个!就不乱了 (逃逃逃
from fis3.
@xiangshouding **
本来就是当前文件夹 + 跨文件夹下的文件, **
只有在后面接了 '/' 才会变成跨目录了。
不信你用 minimatch 试试 '/**' 本来就是会命中根目录下面所有文件及目录。
我扩展的是 **.ext
这种用法,还是没能明白你们说的冲突是啥。
from fis3.
好,这个事儿我来弄。
在 2015年7月9日,上午10:33,liaoxuezhi [email protected] 写道:
@xiangshouding ** 本来就是当前文件夹 + 跨文件夹下的文件, ** 只有在后面接了 '/' 才会变成跨目录了。
不信你用 minimatch 试试 '/**' 本来就是会命中根目录下面所有文件及目录。
我扩展的是 **.ext 这种用法,还是没能明白你们说的冲突是啥。
—
Reply to this email directly or view it on GitHub.
from fis3.
去掉吧,后面只会有更多人吐槽 这种用法 /xxx/{*.js,**/*.js}
”
from fis3.
真是个纠结的问题,忽略我吧。。。
from fis3.
@2betop 先等等,让我再考虑考虑。估计 glob 的案例需要整更多。
from fis3.
决定不改了,已经完善文档,相当明确。
from fis3.
Related Issues (20)
- 就告诉我作者是不是跑路了? HOT 2
- fis.match不能调用parser自定义方法
- _handle.Pngquant is not a constructor HOT 3
- fis3中cache.jsbug HOT 2
- 麻烦给个支持node版本说明 HOT 6
- optimizer.png-compressor: _handle.Pngcrush is not a constructor是什么意思 HOT 2
- fis3能不能集成rollup HOT 1
- fs3 [ v3.4.45 ] node [ v14.16.0 ] 执行 fis3 release -d ../dist 抛出异常 The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView. Received undefined HOT 2
- 启用了loader插件报message.content.replace is not a function
- fis3-deploy-http-push 的问题 HOT 1
- fis3依赖fis3-deploy-http-push2.0.6,fis3-deploy-http-push2.0.6依赖winston2.1.1,当我升级node版本到14,vue项目编译时报错(node:31521) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency HOT 3
- Update packages to avoid introducing vulnerablities HOT 2
- Trying to get in touch regarding a security issue
- 似乎在mac12.1系统版本里面热更新不生效了 HOT 3
- 在mock/server.conf下配置proxy时,如何替换/删除uri的前缀?
- 增加nodejs 14+支持 HOT 4
- react-router-dom的BrowserRouter,fis-conf该怎么配置才能解决再次刷新页面会显示404这个问题 HOT 1
- 不兼容高版本 node HOT 4
- fis3支持node版本问题 HOT 1
- 在deploy中插件中改变modified中文件内容,total中的文件内容不改变,fis3-deploy-replace改变内容后 fis3-deploy-zip打包出去的内容未改变
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fis3.