Skip to content

Commit

Permalink
Merge pull request #242 from oceanbase/dengfuping-dev
Browse files Browse the repository at this point in the history
fix(codemod): should not transform when specific file is not .less
  • Loading branch information
dengfuping authored Oct 30, 2023
2 parents d792401 + c163909 commit 244f140
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/codemod/transforms/less-to-token.js
Original file line number Diff line number Diff line change
@@ -18,15 +18,15 @@ const findAllLessFiles = dir => {
files.forEach(file => {
const filePath = path.join(dir, file);
if (isDirectory.sync(filePath)) {
if (filePath.includes('.umi')) {
if (filePath.includes('.umi') || filePath.includes('.umi-production')) {
return;
}
lessFiles.push(...findAllLessFiles(filePath));
} else if (file.endsWith('.less')) {
lessFiles.push(filePath);
}
});
} else {
} else if (dir.endsWith('.less')) {
lessFiles.push(dir);
}
return lessFiles;

0 comments on commit 244f140

Please sign in to comment.