-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HMR to DLL #26
Merged
Merged
HMR to DLL #26
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server | ||
puma: REACT_ON_RAILS_ENV=HOT PORT=3000 bundle exec puma -C config/puma.rb | ||
webpack-hmr: rm app/assets/webpack/* || true && cd client && HOT_RAILS_PORT=3500 yarn start | ||
# webpack-server-bundle: cd client && yarn run build:server-bundle:dev:watch | ||
puma: PORT=3000 bundle exec puma -C config/puma.rb | ||
webpack-client-bundles: cd client && yarn start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,7 @@ | ||
// NOT USED | ||
// This file is used in production to server generated JS assets. In development mode, we use the Webpack Dev Server | ||
// to provide assets. This allows for hot reloading of the JS and CSS. | ||
// See app/helpers/application_helper.rb for how the correct assets file is picked based on the Rails environment. | ||
// Those helpers are used here: app/views/layouts/application.html.erb | ||
|
||
// This is a manifest file that'll be compiled into application.js, which will include all the files | ||
// listed below. | ||
// | ||
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | ||
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. | ||
// | ||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | ||
// compiled file. JavaScript code in this file should be added after the last require_* statement. | ||
// | ||
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details | ||
// about supported directives. | ||
// | ||
// This asset is located in app/assets/webpack-dll directory | ||
//= require vendor-client-bundle |
20 changes: 0 additions & 20 deletions
20
todo-app-production/app/assets/javascripts/application_hot.js
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
todo-app-production/app/assets/javascripts/application_static.js
This file was deleted.
Oops, something went wrong.
16 changes: 0 additions & 16 deletions
16
todo-app-production/app/assets/stylesheets/application.css
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Webpack styles | ||
@import "vendor-client-bundle.css"; | ||
@import "global-styles-client-bundle.css"; |
4 changes: 0 additions & 4 deletions
4
todo-app-production/app/assets/stylesheets/application_static.scss
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
#:nodoc: | ||
module ApplicationHelper | ||
def dry_run? | ||
ENV["DRY_RUN"] == "true" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
145 changes: 0 additions & 145 deletions
145
todo-app-production/client/package.friendsandguests.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
todo-app-production/client/scripts/build:client-bundles:dev:watch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
NODE_ENV=dev \ | ||
$(yarn bin)/webpack \ | ||
--env=dev \ | ||
--config webpack.config.babel.js \ | ||
--watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
|
||
NODE_ENV=production \ | ||
$(yarn bin)/webpack \ | ||
--env.prod \ | ||
--env=prod \ | ||
--config webpack.config.babel.js |
7 changes: 7 additions & 0 deletions
7
todo-app-production/client/scripts/build:client-bundles:prod:watch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
NODE_ENV=production \ | ||
$(yarn bin)/webpack \ | ||
--env=prod \ | ||
--config webpack.config.babel.js \ | ||
--watch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,5 +2,5 @@ | |
|
||
NODE_ENV=test \ | ||
$(yarn bin)/webpack \ | ||
--env.rspec \ | ||
--env=rspec \ | ||
--config webpack.config.babel.js |
7 changes: 7 additions & 0 deletions
7
todo-app-production/client/scripts/build:client-bundles:rspec:watch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/sh | ||
|
||
NODE_ENV=test \ | ||
$(yarn bin)/webpack \ | ||
--env=rspec \ | ||
--config webpack.config.babel.js \ | ||
--watch |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without the
*.css
extension, SCSS was throwing an import error thatvendor-client-bundle
either could not be found or was not valid SCSS. I'm assuming that it was trying to importvendor-client-bundle.js
, but since adding the extension worked, I didn't debug further.