diff --git a/app/javascript/src/components/Navigation/index.jsx b/app/javascript/src/components/Navigation/index.jsx index 75a532f36..6fec9dacb 100644 --- a/app/javascript/src/components/Navigation/index.jsx +++ b/app/javascript/src/components/Navigation/index.jsx @@ -16,10 +16,11 @@ import SearchDropdown from "./components/SearchDropdown"; import NotificationsDropdown from "./components/NotificationsDropdown"; import InfoDropdown from "./components/InfoDropdown"; import UserAccountDropdown from "./components/UserAccountDropdown"; -import withExtras from 'react-hijack'; -import addonsConfig from '../../componentLoader/config'; -import massageConfiguration from '../../componentLoader/massageConfiguration'; -import componentLoader from '../../componentLoader'; +// Ignore so Heroku builds pass +//import withExtras from 'react-hijack'; +//import addonsConfig from '../../componentLoader/config'; +//import massageConfiguration from '../../componentLoader/massageConfiguration'; +//import componentLoader from '../../componentLoader'; const StyledNavbar = styled(Navbar)` background-color: ${WHITE_COLOR}; @@ -151,9 +152,12 @@ Navigation.propTypes = { // Map the states from store to component props const mapStateToProps = ({ current_team }) => ({ current_team }); -const NavigationWithExtras = withExtras({ - identifier: 'navigation', - config: massageConfiguration(addonsConfig, 'navigation'), -}, componentLoader)(Navigation); -export default connect(mapStateToProps)(NavigationWithExtras); +// Ignore so Heroku builds pass +//const NavigationWithExtras = withExtras({ +// identifier: 'navigation', +// config: massageConfiguration(addonsConfig, 'navigation'), +//}, componentLoader)(Navigation); +// +//export default connect(mapStateToProps)(NavigationWithExtras); +export default connect(mapStateToProps)(Navigation); diff --git a/config/initializers/addon_loader.rb b/config/initializers/addon_loader.rb index bbc58fb20..a03d3963a 100644 --- a/config/initializers/addon_loader.rb +++ b/config/initializers/addon_loader.rb @@ -1,31 +1,32 @@ -TARGET_ROOT = "#{Dir.pwd}/app/javascript/src/componentLoader".freeze -COMPONENTS_ROOT = "#{TARGET_ROOT}/components".freeze -UBER_CONFIG_PATH = "#{TARGET_ROOT}/availableAddons.js".freeze - -begin -# clear previous build -FileUtils.rm_f Dir.glob("#{COMPONENTS_ROOT}/*") -FileUtils.rm_f Dir.glob(UBER_CONFIG_PATH) -File.new(UBER_CONFIG_PATH, 'w+') -enabled_addons = [] - -Dir.foreach('addons/') do |path| - addons_client_root = "addons/#{path}/client" - next unless Dir.exist? addons_client_root - File.open(UBER_CONFIG_PATH, 'w') do |file| - file.puts("import #{path} from \'./components/#{path}/config.js\';") - end - enabled_addons << "#{path}" - File.symlink("#{Dir.pwd}/#{addons_client_root}", "#{COMPONENTS_ROOT}/#{path}") -end - -File.open(UBER_CONFIG_PATH, 'a') do |file| - file.puts("export default { #{enabled_addons.join(", ").gsub(/\"/, '')} };") -end - -# handles error on the platforms that does not support symlink -# http://ruby-doc.org/core-2.2.0/File.html#symlink-method -rescue - puts '[sciNote] Unable to load React components from addons!' - puts '[sciNote] Your system does not support symlink!' -end +# Ignoring so Heroku builds pass +#TARGET_ROOT = "#{Dir.pwd}/app/javascript/src/componentLoader".freeze +#COMPONENTS_ROOT = "#{TARGET_ROOT}/components".freeze +#UBER_CONFIG_PATH = "#{TARGET_ROOT}/availableAddons.js".freeze +# +#begin +## clear previous build +#FileUtils.rm_f Dir.glob("#{COMPONENTS_ROOT}/*") +#FileUtils.rm_f Dir.glob(UBER_CONFIG_PATH) +#File.new(UBER_CONFIG_PATH, 'w+') +#enabled_addons = [] +# +#Dir.foreach('addons/') do |path| +# addons_client_root = "addons/#{path}/client" +# next unless Dir.exist? addons_client_root +# File.open(UBER_CONFIG_PATH, 'w') do |file| +# file.puts("import #{path} from \'./components/#{path}/config.js\';") +# end +# enabled_addons << "#{path}" +# File.symlink("#{Dir.pwd}/#{addons_client_root}", "#{COMPONENTS_ROOT}/#{path}") +#end +# +#File.open(UBER_CONFIG_PATH, 'a') do |file| +# file.puts("export default { #{enabled_addons.join(", ").gsub(/\"/, '')} };") +#end +# +## handles error on the platforms that does not support symlink +## http://ruby-doc.org/core-2.2.0/File.html#symlink-method +#rescue +# puts '[sciNote] Unable to load React components from addons!' +# puts '[sciNote] Your system does not support symlink!' +#end diff --git a/package.json b/package.json index 13b850956..5a0d7c4f3 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,6 @@ "react-data-grid": "^2.0.2", "react-document-title": "^2.0.3", "react-dom": "15.6.1", - "react-hijack": "biosistemika/react-hijack#2.0.1", "react-intl": "^2.3.0", "react-intl-redux": "^0.6.0", "react-moment": "^0.6.4",