赞
踩
除了 .gitignore 以外,很多工具都有 ignore 文件,比如 .eslintignore, .prettierignore 等等。它们的语法都是跟 .gitignore 一样的。现在我们来看一下 .gitignore 的一些基础语法。
- # 排除了 foo/bar 的所有文件。
- /*
- !/foo
- /foo/*
- !/foo/bar
/* 表示忽略根目录下的所有文件和目录。
- .DS_Store
- node_modules
-
- # local env files
- .env.local
- .env.*.local
- .env.development
- .env.production
-
- # Log files
- npm-debug.log*
- yarn-debug.log*
- yarn-error.log*
- pnpm-debug.log*
-
- # Editor directories and files
- .idea
- .vscode
- *.suo
- *.ntvs*
- *.njsproj
- *.sln
- *.sw?
- .history
- .resolve.conf.js

转载自:ESlint Prettier Git 中使用 ignore忽略文件的规则解释_胡聊前端的博客-CSDN博客_prettier忽略文件
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。