From 0fdc0b142397c037324703218f8acc0f1155ae13 Mon Sep 17 00:00:00 2001 From: nfc036 Date: Mon, 10 Oct 2016 16:29:34 +0200 Subject: [PATCH 1/2] Cosmetics for docs, renamed function name and parameter name Renamed `_doesFileExistIsCurrentProjectAddonModule` to `_doesFileExistInCurrentProjectAddonModule` and its parameter from `_relativePath` to `relativePath` to make is consistent with other `_doesFileExist...`-functions. Cosmetics only, no functional changes. --- index.js | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/index.js b/index.js index 72c2b63b..ff55c070 100644 --- a/index.js +++ b/index.js @@ -124,21 +124,23 @@ module.exports = { return this._doesTemplateFileExist(relativePath); }, - /** + + /** * Check if a file exists within the current addon directory. Removing `module/` from the path. * @param {String} relativePath - path to file within current app * @returns {Boolean} whether or not the file exists within the current app */ - _doesFileExistIsCurrentProjectAddonModule: function(_relativePath) { - var relativePathWithoutProjectNamePrefix = _relativePath.replace('modules' + '/' + this._parentName(), ''); - var relativePath = 'addon/' + relativePathWithoutProjectNamePrefix; + _doesFileExistInCurrentProjectAddonModule: function(relativePath) { + var relativePathWithoutProjectNamePrefix = relativePath.replace('modules' + '/' + this._parentName(), ''); + var _relativePath = 'addon/' + relativePathWithoutProjectNamePrefix; - if (this._existsSync(relativePath)) { + if (this._existsSync(_relativePath)) { return true; } - return this._doesTemplateFileExist(relativePath); + return this._doesTemplateFileExist(_relativePath); }, + /** * Check if a file exists within the dummy app * @param {String} relativePath - path to file within dummy app @@ -204,7 +206,7 @@ module.exports = { this._doesFileExistInDummyApp(relativePath) || this._doesFileExistInCurrentProjectApp(relativePath) || this._doesFileExistInCurrentProjectAddon(relativePath) || - this._doesFileExistIsCurrentProjectAddonModule(relativePath) + this._doesFileExistInCurrentProjectAddonModule(relativePath) ); return !fileExists; From 4a878683f7e26108a49e892621cd047be5456ccc Mon Sep 17 00:00:00 2001 From: nfc036 Date: Mon, 10 Oct 2016 16:42:31 +0200 Subject: [PATCH 2/2] removed trailing spaces (eslint) spaces removed that lead to a failing eslint test. --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index ff55c070..17992ac4 100644 --- a/index.js +++ b/index.js @@ -124,7 +124,7 @@ module.exports = { return this._doesTemplateFileExist(relativePath); }, - + /** * Check if a file exists within the current addon directory. Removing `module/` from the path. * @param {String} relativePath - path to file within current app @@ -140,7 +140,7 @@ module.exports = { return this._doesTemplateFileExist(_relativePath); }, - + /** * Check if a file exists within the dummy app * @param {String} relativePath - path to file within dummy app