Skip to content

Commit 75372d5

Browse files
committed
ci: fix import paths
1 parent 6a2b2b8 commit 75372d5

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

lib/generators/react_on_rails/react_with_redux_generator.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def create_redux_directories
1313
empty_directory("app/javascript/src/HelloWorldApp/ror_components")
1414

1515
# Create Redux support directories within the component directory
16-
dirs = %w[actions constants containers reducers store]
16+
dirs = %w[actions constants containers reducers store components]
1717
dirs.each { |name| empty_directory("app/javascript/src/HelloWorldApp/#{name}") }
1818
end
1919

@@ -26,7 +26,7 @@ def copy_base_files
2626
copy_file("#{base_js_path}/app/javascript/bundles/HelloWorld/startup/HelloWorldApp.server.jsx",
2727
"app/javascript/src/HelloWorldApp/ror_components/HelloWorldApp.server.jsx")
2828
copy_file("#{base_js_path}/app/javascript/bundles/HelloWorld/components/HelloWorld.module.css",
29-
"app/javascript/src/HelloWorldApp/HelloWorldApp.module.css")
29+
"app/javascript/src/HelloWorldApp/components/HelloWorld.module.css")
3030

3131
# Update import paths in client component
3232
ror_client_file = "app/javascript/src/HelloWorldApp/ror_components/HelloWorldApp.client.jsx"
@@ -41,7 +41,8 @@ def copy_base_redux_files
4141
containers/HelloWorldContainer.js
4242
constants/helloWorldConstants.js
4343
reducers/helloWorldReducer.js
44-
store/helloWorldStore.js].each do |file|
44+
store/helloWorldStore.js
45+
components/HelloWorld.jsx].each do |file|
4546
copy_file("#{base_hello_world_path}/#{file}",
4647
"app/javascript/src/HelloWorldApp/#{file}")
4748
end
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import HelloWorld from './HelloWorld.client';
1+
import HelloWorldApp from './HelloWorldApp.client';
22
// This could be specialized for server rendering
33
// For example, if using React Router, we'd have the SSR setup here.
44

5-
export default HelloWorld;
5+
export default HelloWorldApp;

0 commit comments

Comments
 (0)