Use the correct name in imports
This commit is contained in:
@@ -13,7 +13,7 @@ glob('src/**/*.js', {}, function(err, files) {
|
||||
const line = lines[i];
|
||||
const match = line.match(/export default _.*_([^;]*)_;$/);
|
||||
if (match && match.length) {
|
||||
var newName = match[1] + '.js';
|
||||
const newName = match[1] + '.js';
|
||||
if (newName != newName.toLowerCase()) {
|
||||
fs.renameSync(filename, path.resolve(path.dirname(filename), newName));
|
||||
++renamed;
|
||||
|
||||
@@ -57,7 +57,7 @@ function resolve(fromName, toName) {
|
||||
}
|
||||
|
||||
const back = new Array(fromLength - commonDepth).join('../') || './';
|
||||
let relative = back + toParts.slice(commonDepth).join('/').toLowerCase();
|
||||
let relative = back + toParts.slice(commonDepth).join('/');
|
||||
if (relative.endsWith('/')) {
|
||||
relative += 'index';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user