File tree 7 files changed +6
-13
lines changed
7 files changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ install:
29
29
- npm install npm@latest -g
30
30
- npm --version
31
31
- npm install
32
- - rake db:setup
33
32
- npm run build:client && npm run build:server
33
+ - rake db:setup
34
34
35
35
# Tip: No need to run xvfb if running headless testing. However, we're going to start with
36
36
# Poltergeist and switch to selenium if a test fails.
Original file line number Diff line number Diff line change 7
7
rails: REACT_ON_RAILS_ENV=HOT rails s -b 0.0.0.0
8
8
9
9
# Run the hot reload server for client development
10
- hot-assets: sh -c 'rm app/assets/webpack/* || true && HOT_RAILS_PORT=3500 npm run hot-assets'
10
+ hot-assets: sh -c 'rm app/assets/webpack/* || true && bundle exec rake react_on_rails:locale && HOT_RAILS_PORT=3500 npm run hot-assets'
11
11
12
12
# Render static client assets
13
13
rails-static-client-assets: sh -c 'npm run build:dev:client'
Original file line number Diff line number Diff line change 6
6
rails: REACT_ON_RAILS_ENV=HOT rails s -b 0.0.0.0
7
7
8
8
# Run the hot reload server for client development
9
- hot-assets: sh -c 'rm app/assets/webpack/* || true && HOT_RAILS_PORT=3500 npm run hot-assets'
9
+ hot-assets: sh -c 'rm app/assets/webpack/* || true && bundle exec rake react_on_rails:locale && HOT_RAILS_PORT=3500 npm run hot-assets'
10
10
11
11
# Keep the JS fresh for server rendering. Remove if not server rendering
12
12
rails-server-assets: sh -c 'npm run build:dev:server'
Original file line number Diff line number Diff line change 3
3
# in rails_helper.rb.
4
4
5
5
# Build client assets, watching for changes.
6
- rails -client -assets : sh -c 'npm run build:dev:client'
6
+ rails -client -assets : sh -c 'bundle exec rake react_on_rails:locale && npm run build:dev:client'
7
7
8
8
# Build server assets, watching for changes. Remove if not server rendering.
9
9
rails -server -assets : sh -c 'npm run build:dev:server'
Original file line number Diff line number Diff line change 2
2
rails: REACT_ON_RAILS_ENV= rails s -b 0.0.0.0
3
3
4
4
# Build client assets, watching for changes.
5
- rails-client-assets: rm app/assets/webpack/* || true && npm run build:dev:client
5
+ rails-client-assets: rm app/assets/webpack/* || true && bundle exec rake react_on_rails:locale && npm run build:dev:client
6
6
7
7
# Build server assets, watching for changes. Remove if not server rendering.
8
8
rails-server-assets: npm run build:dev:server
Original file line number Diff line number Diff line change 2
2
rails: TRACE_REACT_ON_RAILS=TRUE rails s -b 0.0.0.0
3
3
4
4
# Build client assets, watching for changes.
5
- rails-client-assets: npm run build:dev:client
5
+ rails-client-assets: bundle exec rake react_on_rails:locale && npm run build:dev:client
6
6
7
7
# Build server assets, watching for changes. Remove if not server rendering.
8
8
rails-server-assets: npm run build:dev:server
Original file line number Diff line number Diff line change @@ -12,12 +12,5 @@ class Application < Rails::Application
12
12
# Application configuration should go into files in config/initializers
13
13
# -- all .rb files in that directory are automatically loaded.
14
14
config . action_cable . allowed_request_origins = [ Rails . application . secrets . action_cable_url ]
15
-
16
- ################################################################################
17
- # ReactOnRails will convert rails locales to javascript files for react-intl.
18
- ################################################################################
19
- config . after_initialize do
20
- ReactOnRails ::LocalesToJs . new
21
- end
22
15
end
23
16
end
You can’t perform that action at this time.
0 commit comments