From fb387d0936baaf6b524eccd340b882aef4231fef Mon Sep 17 00:00:00 2001 From: Apoorva Patil <54561970+rayangou@users.noreply.github.com> Date: Fri, 5 Jun 2020 00:22:49 -0700 Subject: [PATCH 1/2] Support for Node js Support for Node js --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e3428c2..bfe5e7d 100644 --- a/index.js +++ b/index.js @@ -71,12 +71,16 @@ module.exports = { if (_paceConfig && name === 'styles') { var paceThemeName = path.join(_paceConfig.color, 'pace-theme-' + _paceConfig.theme + '.css'), originalPaceThemePath = path.join(this.app.bowerDirectory, PACE_DIR, 'themes', paceThemeName), - addonPaceThemePath = path.join('vendor', 'ember-cli-pace', 'themes', paceThemeName); + addonPaceThemePath = path.join('vendor', 'ember-cli-pace', 'themes', paceThemeName), + nodeModulePath = path.join('node_modules', 'ember-cli-pace'), + addonPaceThemePathExtra = path.join(nodeModulePath, 'vendor', 'ember-cli-pace', 'themes', paceThemeName); if (fs.existsSync(originalPaceThemePath)) { this.app.import(originalPaceThemePath); } else if (fs.existsSync(addonPaceThemePath)) { this.app.import(addonPaceThemePath); + } else if (fs.existsSync(addonPaceThemePathExtra)) { + this.app.import(addonPaceThemePathExtra); } else { throw new Error('Pace theme CSS file was not found: ' + paceThemeName); } From 560f987e036ac2897a6f5d8301f1b51bffa8137c Mon Sep 17 00:00:00 2001 From: Apoorva Patil <54561970+rayangou@users.noreply.github.com> Date: Fri, 5 Jun 2020 00:24:46 -0700 Subject: [PATCH 2/2] Incorporating code review coments --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index bfe5e7d..ba64230 100644 --- a/index.js +++ b/index.js @@ -72,8 +72,8 @@ module.exports = { var paceThemeName = path.join(_paceConfig.color, 'pace-theme-' + _paceConfig.theme + '.css'), originalPaceThemePath = path.join(this.app.bowerDirectory, PACE_DIR, 'themes', paceThemeName), addonPaceThemePath = path.join('vendor', 'ember-cli-pace', 'themes', paceThemeName), - nodeModulePath = path.join('node_modules', 'ember-cli-pace'), - addonPaceThemePathExtra = path.join(nodeModulePath, 'vendor', 'ember-cli-pace', 'themes', paceThemeName); + nodeModulePath = path.join('node_modules', 'ember-cli-pace', 'vendor'), + addonPaceThemePathExtra = path.join(nodeModulePath, 'ember-cli-pace', 'themes', paceThemeName); if (fs.existsSync(originalPaceThemePath)) { this.app.import(originalPaceThemePath);