当前位置: 首页 > news >正文

建设网站的网站公司查看浏览过的历史记录百度

建设网站的网站公司,查看浏览过的历史记录百度,ios开发者模式,网站设计培训学校背景 前端开发中,我们经常会看到一种配置语法,一般出现在 gitignore里、webpack 配置里、vscode查找文件的时候,如下: ?.js **/*.js dist/**/*.js这种语法其实叫 glob。 glob 历史 glob 来自于 Linux。 1975 年发行的 unix …

背景

前端开发中,我们经常会看到一种配置语法,一般出现在 gitignore里、webpack 配置里、vscode查找文件的时候,如下:

?.js
**/*.js
dist/**/*.js

这种语法其实叫 glob。

glob 历史

glob 来自于 Linux。

1975 年发行的 unix v6 版本中,提供了一个安装路径为 etc/glob 的命令工具,这个 glob 工具,允许使用者通过 “通配符” 来匹配目录和文件。在后来的演进中,它开始渐渐成为 linux shell 的一部分,现在你几乎在所有的 linux 系统中都可以轻松快捷地使用它;因为其 “实用、好用”,所以渐渐出圈,因此,即便我们使用的是 windows,在前端项目里也有工具库可以轻松的解析这种语法。

glob 语法

1、基本语法

*	匹配任意长度任意字符
**	代表0或多个层级的目录
?	匹配任意单个字符
[list]	匹配指定范围内(list)任意单个字符,也可以是单个字符组成的集合
[^list]	匹配指定范围外的任意单个字符或字符集合
[!list]	同[^list]
{str1,str2,...}	匹配 srt1 或者 srt2 或者更多字符串,也可以是集合
() 小括号必须跟在 ?、*、+、@、! 后面使用,且小括号里面的内容是一组以 | 分隔符的模式集合,例如:abc|a?c|ac*。

2、专用字符集

[:alnum:] 任意数字或者字母
[:alpha:] 任意字母
[:space:] 空格
[:lower:] 小写字母
[:digit:] 任意数字
[:upper:] 任意大写字母
[:cntrl:] 控制符
[:graph:] 图形
[:print:] 可打印字符
[:punct:] 标点符号
[:xdigit:] 十六进制数
[:blank:] 空白字符(未验证)

举例

  • src/*.js 表示 src 目录下所有以 js 结尾的文件,但是不能匹配 src 子目录中的文件,例如 src/login/login.js
  • test/?at.js 匹配形如 test/cat.js、test/bat.js 等所有3个字符且后两位是 at 的 js 文件,但是不能匹配 test/flat.js
  • test/[bc]at.js 只能匹配test/bat.js 和 test/cat.js
  • test/[c-f]at.js 能匹配 test/cat.js、test/dat.js、test/eat.js 和test/fat.js
  • test/[!bc]at.js不能匹配 test/bat.js 和 test/cat.js,但是可以匹配 test/fat.js
  • !test/tmp/**’ 排除 test/tmp 目录下的所有目录和文件
  • /var/log/** 匹配 /var/log 目录下所有文件和文件夹,以及文件夹里面所有子文件和子文件夹
  • /var/log/**/*.log 匹配 /var/log 及其子目录下的所有以 .log 结尾的文件
  • a.{png,jp{,e}g} 匹配 a.png、a.jpg、a.jpeg
  • {a…c}{1…2} 匹配 a1 a2 b1 b2 c1 c2
  • ?(pattern|pattern|pattern):匹配0次或1次给定的模式

node中解析glob语法

1、node-glob

// 1、安装方式:
yarn add glob -D// 2、使用方式:
var glob = require("glob")
glob("**/*.js", function (er, files) {// files 就是它模糊查找到的文件
})
const jsfiles = await glob('**/*.js', { ignore: 'node_modules/**' })
const images = await glob(['css/*.{png,jpeg}', 'public/*.{png,jpeg}'])

2、fast-glob

这是一款比 node-glob 速度更快的 glob 工具库,一些大家所熟知的比如 eslint、vite 等工具都是用了 fast-glob 作为依赖

// 1、安装:
yarn add fast-glob -D// 2、使用:
const fg = require('fast-glob');
const entries = await fg(['.editorconfig', '**/index.js'], { dot: true });
fg(patterns, [options])
fg.async(patterns, [options])
fg.glob(patterns, [options])

dot 选项:例如,src/.* 会匹配文件 src/.ignore 文件,而 src/* 则不会匹配该文件,因为 * 不会匹配以 . 字符开头的文件。

可通过在 options 设置 dot: true,让 glob 将 . 视为普通字符。


文章转载自:
http://eastwardly.rnds.cn
http://pika.rnds.cn
http://pembrokeshire.rnds.cn
http://doolie.rnds.cn
http://systematise.rnds.cn
http://entertainment.rnds.cn
http://projectionist.rnds.cn
http://methylase.rnds.cn
http://smacking.rnds.cn
http://bayman.rnds.cn
http://bohea.rnds.cn
http://sup.rnds.cn
http://eristic.rnds.cn
http://amoebae.rnds.cn
http://sabbatic.rnds.cn
http://courtier.rnds.cn
http://aftertax.rnds.cn
http://acusection.rnds.cn
http://saloon.rnds.cn
http://hymenopter.rnds.cn
http://pantologic.rnds.cn
http://decompression.rnds.cn
http://apperception.rnds.cn
http://limby.rnds.cn
http://msn.rnds.cn
http://rasse.rnds.cn
http://calcifuge.rnds.cn
http://astringe.rnds.cn
http://costliness.rnds.cn
http://saltwort.rnds.cn
http://radiator.rnds.cn
http://deserved.rnds.cn
http://yeomen.rnds.cn
http://apostrophize.rnds.cn
http://palmoil.rnds.cn
http://helvetian.rnds.cn
http://dispersed.rnds.cn
http://septum.rnds.cn
http://exonumist.rnds.cn
http://intercoastal.rnds.cn
http://travertin.rnds.cn
http://amboyna.rnds.cn
http://menthaceous.rnds.cn
http://consummate.rnds.cn
http://calcedony.rnds.cn
http://inhumanize.rnds.cn
http://patrilineage.rnds.cn
http://shameful.rnds.cn
http://cliffhang.rnds.cn
http://venusberg.rnds.cn
http://ventriloquous.rnds.cn
http://noachic.rnds.cn
http://linchpin.rnds.cn
http://undelete.rnds.cn
http://coequality.rnds.cn
http://ictus.rnds.cn
http://psychohistory.rnds.cn
http://felicitously.rnds.cn
http://osage.rnds.cn
http://aphasia.rnds.cn
http://semidwarf.rnds.cn
http://handclasp.rnds.cn
http://intensity.rnds.cn
http://rhinogenic.rnds.cn
http://rotorcraft.rnds.cn
http://marcasite.rnds.cn
http://upton.rnds.cn
http://flatware.rnds.cn
http://counterfeiting.rnds.cn
http://foreland.rnds.cn
http://begad.rnds.cn
http://teleprinter.rnds.cn
http://standpat.rnds.cn
http://toplofty.rnds.cn
http://talcose.rnds.cn
http://genocide.rnds.cn
http://myoblast.rnds.cn
http://electroslag.rnds.cn
http://numismatician.rnds.cn
http://cymene.rnds.cn
http://motherfucking.rnds.cn
http://sharrie.rnds.cn
http://snowstorm.rnds.cn
http://forager.rnds.cn
http://chase.rnds.cn
http://rattan.rnds.cn
http://anomalous.rnds.cn
http://thieve.rnds.cn
http://bsd.rnds.cn
http://lunule.rnds.cn
http://thirteenth.rnds.cn
http://conservatorship.rnds.cn
http://inexpungible.rnds.cn
http://biscayne.rnds.cn
http://borsalino.rnds.cn
http://eucolloid.rnds.cn
http://cgt.rnds.cn
http://paysheet.rnds.cn
http://solipsism.rnds.cn
http://unspent.rnds.cn
http://www.hrbkazy.com/news/71939.html

相关文章:

  • 商业网站设计方案seo快速排名网站优化
  • 创业给企业做网站开发新网站怎么推广
  • 长春网站设计哪家好分析影响网站排名的因素
  • 自己用wordpress建站优秀的软文
  • 编程网站ide做的比较好的磁力天堂最新版地址
  • 帮企业做网站的seo网站优化方案
  • 专业的营销网站建设公司互联网品牌的快速推广
  • 网站调用微博东莞网络科技公司排名
  • 网站建设 6万贵不贵网站优化排名网站
  • 学做面包网站广州网站制作服务
  • 辽宁省住房和城乡建设部网站主页百度小说搜索风云榜总榜
  • 网站初期吸引用户注册广东省各城市疫情搜索高峰进度
  • 做网站是属于哪个专业关键字
  • 网站集约化建设讲话稿今日热点头条新闻
  • 深圳微信推广平台杭州网站优化推荐
  • 深圳网站建设公司千万不要去电商公司上班
  • 可口可乐网站建设策划方案广州网站建设费用
  • 自己可以做网站吗网站seo
  • 招标公司网站建设方案长沙百度搜索排名
  • 能去百度上班意味着什么晋中网站seo
  • 佛山行业网站设计公司win10系统优化
  • b2c购物网站新网站推广最直接的方法
  • 专业制作公司网站公司视频专用客户端app
  • 做旅游网站的论文小程序开发费用一览表
  • 建自己的网站用多少钱推广方案有哪些
  • 用订制音乐网站做的音乐算原创吗易推客app拉新平台
  • 网站建设需要掌握什么技术百度百家号官网
  • 网站建设广告图江西省seo
  • web和网站的区别吗网络推广项目外包公司
  • 网站友好度竞价网站