mirror of
https://github.com/zhigang1992/create-react-app.git
synced 2026-01-12 22:46:30 +08:00
ignore intellij module files when generating an app (#4605)
This commit is contained in:
committed by
Joe Haddad
parent
79ad494367
commit
20be1b6707
@@ -748,7 +748,6 @@ function isSafeToCreateProjectIn(root, name) {
|
||||
'.idea',
|
||||
'README.md',
|
||||
'LICENSE',
|
||||
'web.iml',
|
||||
'.hg',
|
||||
'.hgignore',
|
||||
'.hgcheck',
|
||||
@@ -764,6 +763,8 @@ function isSafeToCreateProjectIn(root, name) {
|
||||
const conflicts = fs
|
||||
.readdirSync(root)
|
||||
.filter(file => !validFiles.includes(file))
|
||||
// IntelliJ IDEA creates module files before CRA is launched
|
||||
.filter(file => !/\.iml$/.test(file))
|
||||
// Don't treat log files from previous installation as conflicts
|
||||
.filter(
|
||||
file => !errorLogFilePatterns.some(pattern => file.indexOf(pattern) === 0)
|
||||
|
||||
Reference in New Issue
Block a user