Skip to content

Commit

Permalink
Change webpack-bundle to hello-world-bundle
Browse files Browse the repository at this point in the history
For the generator
  • Loading branch information
justin808 committed Aug 16, 2017
1 parent 0b0461b commit 3f4ab24
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/additional-reading/rails-assets-relative-paths.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ module.exports = {
],

output: {
filename: 'webpack-bundle.js',
filename: 'hello-world-bundle.js',
path: '../app/assets/webpack'
},

Expand Down
2 changes: 1 addition & 1 deletion docs/additional-reading/rspec-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The following `config/react_on_rails.rb` settings **must** match your setup:
config.generated_assets_dir = File.join(%w[public webpack], Rails.env)

# Define the files we need to check for webpack compilation when running tests.
config.webpack_generated_files = %w( webpack-bundle.js )
config.webpack_generated_files = %w( hello-world-bundle.js )

# If you are using the ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
# with rspec then this controls what yarn command is run
Expand Down
2 changes: 1 addition & 1 deletion docs/api/ruby-api-hot-reload-view-helpers.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ static vs. hot is picked based on whether `ENV["REACT_ON_RAILS_ENV"] == "HOT"`
<!-- This is to load the hot assets. -->
<!-- Note, you can have multiple files here. It's an array. -->
<%= env_javascript_include_tag(hot: ['http://localhost:3500/webpack-bundle.js]') %>
<%= env_javascript_include_tag(hot: ['http://localhost:3500/hello-world-bundle.js]') %>
<!-- These do use turbolinks -->
<%= env_javascript_include_tag(static: 'application_static',
Expand Down
4 changes: 2 additions & 2 deletions lib/generators/react_on_rails/base_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ def print_helpful_message
What to do next:
- Include your webpack assets to your application layout.
- Include your webpack assets to your application layout. Change hello-world-bundle as needed.
<%= javascript_pack_tag 'main' %>
<%= javascript_pack_tag 'hello-world-bundle' %>
- Ensure your bundle and yarn installs of dependencies are up to date.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,7 @@
<head>
<title>ReactOnRailsWithWebpacker</title>
<%%= csrf_meta_tags %>

<%%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<%%= javascript_pack_tag 'webpack-bundle' %>
<%%= javascript_pack_tag 'hello-world-bundle' %>
</head>

<body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const config = {
context: resolve(__dirname),

entry: {
'webpack-bundle': [
'hello-world-bundle': [
'es5-shim/es5-shim',
'es5-shim/es5-sham',
'babel-polyfill',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ ReactOnRails.configure do |config|
config.generated_assets_dir = File.join(%w[public webpack], Rails.env)

# Define the files we need to check for webpack compilation when running tests.
config.webpack_generated_files = %w( webpack-bundle.js )
config.webpack_generated_files = %w( hello-world-bundle.js )

# This is the file used for server rendering of React when using `(prerender: true)`
# If you are never using server rendering, you may set this to "".
# If you are using the same file for client and server rendering, having this set probably does
# not affect performance.
config.server_bundle_js_file = "webpack-bundle.js"
config.server_bundle_js_file = "hello-world-bundle.js"

# If you are using the ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
# with rspec then this controls what yarn command is run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "0.0.0",
"private": true,
"scripts": {
"start": "node ./server.js -s webpack-bundle.js"
"start": "node ./server.js -s hello-world-bundle.js"
},
"dependencies": {
}
Expand Down
2 changes: 1 addition & 1 deletion lib/react_on_rails/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def self.configure_generated_assets_dirs_deprecation
def self.ensure_webpack_generated_files_exists
return unless @configuration.webpack_generated_files.empty?

files = ["webpack-bundle.js"]
files = ["hello-world-bundle.js"]
if @configuration.server_bundle_js_file.present?
files << @configuration.server_bundle_js_file
end
Expand Down
2 changes: 1 addition & 1 deletion rakelib/example_type.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def webpack_bundles_dir

def webpack_bundles
bundles = []
bundles << File.join(webpack_bundles_dir, "webpack-bundle.js")
bundles << File.join(webpack_bundles_dir, "hello-world-bundle.js")
end

def gemfile
Expand Down
8 changes: 4 additions & 4 deletions spec/react_on_rails/generators/install_generator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@
What to do next:
- Include your webpack assets to your application layout.
- Include your webpack assets to your application layout. Change hello-world-bundle as needed.
<%= javascript_pack_tag 'main' %>
<%= javascript_pack_tag 'hello-world-bundle' %>
- Ensure your bundle and yarn installs of dependencies are up to date.
Expand All @@ -107,9 +107,9 @@
What to do next:
- Include your webpack assets to your application layout.
- Include your webpack assets to your application layout. Change hello-world-bundle as needed.
<%= javascript_pack_tag 'main' %>
<%= javascript_pack_tag 'hello-world-bundle' %>
- Ensure your bundle and yarn installs of dependencies are up to date.
Expand Down

0 comments on commit 3f4ab24

Please sign in to comment.