From e876003684596418894c83728dc4d8590cc2b96e Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Tue, 12 Sep 2017 15:33:23 +0200 Subject: [PATCH] Use the correct name in imports --- tasks/filename-case-from-module.js | 2 +- transforms/module.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/filename-case-from-module.js b/tasks/filename-case-from-module.js index 1e74774624..7bbcb2bd62 100644 --- a/tasks/filename-case-from-module.js +++ b/tasks/filename-case-from-module.js @@ -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; diff --git a/transforms/module.js b/transforms/module.js index ca09221344..6c71ca7735 100644 --- a/transforms/module.js +++ b/transforms/module.js @@ -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'; }