File tree Expand file tree Collapse file tree 13 files changed +114
-56
lines changed
Expand file tree Collapse file tree 13 files changed +114
-56
lines changed Original file line number Diff line number Diff line change 1- 11
1+ 12
Original file line number Diff line number Diff line change 1- ruby-2.5.3
1+ ruby-2.7.1
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ gemfile: Gemfile
2121env :
2222 global :
2323 - RAILS_ENV=test
24+ - NODE_ENV=test
2425 - DRIVER=selenium_chrome
2526 - CHROME_BIN=/usr/bin/google-chrome
2627 - USE_COVERALLS=TRUE
@@ -34,7 +35,7 @@ before_install:
3435
3536install :
3637 - travis_retry gem install bundler -v '<2' # Ruby 2.2 and Rails 3.2 & 4.2 depend on bundler 1.x.
37- - travis_retry nvm install 11.7.0
38+ - travis_retry nvm install 12
3839 - node -v
3940 - travis_retry npm i -g yarn
4041 - travis_retry bundle install
Original file line number Diff line number Diff line change 33source "https://rubygems.org"
44ruby "2.7.1"
55
6- gem "react_on_rails" , "12.0.0-beta.1 "
6+ gem "react_on_rails" , github : "shakacode/react_on_rails" , branch : "justin808/remove-precompile-rake "
77gem "webpacker"
88
99# Bundle edge Rails instead: gem "rails", github: "rails/rails"
9696group :test do
9797 gem "capybara" , "2.18.0"
9898 gem "capybara-screenshot"
99- gem "chromedriver-helper"
10099 gem "coveralls" , require : false
101100 gem "database_cleaner"
102101 gem "generator_spec"
103102 gem "launchy"
104103 gem "rails_best_practices"
105104 gem "rspec-rails" , "3.7.2"
106105 gem "selenium-webdriver"
106+ gem "webdrivers" , "~> 4.0"
107107end
Original file line number Diff line number Diff line change 1+ GIT
2+ remote: https://github.com/shakacode/react_on_rails.git
3+ revision: 38403e66bba1c3fde7edd4fb46c7f7daaaa111a6
4+ branch: justin808/remove-precompile-rake
5+ specs:
6+ react_on_rails (12.0.0.pre.beta.2 )
7+ addressable
8+ connection_pool
9+ execjs (~> 2.5 )
10+ rails (>= 3.2 )
11+ rainbow (~> 3.0 )
12+ webpacker (>= 4.0 )
13+
114GEM
215 remote: https://rubygems.org/
316 specs:
4457 tzinfo (~> 1.1 )
4558 addressable (2.7.0 )
4659 public_suffix (>= 2.0.2 , < 5.0 )
47- archive-zip (0.12.0 )
48- io-like (~> 0.3.0 )
4960 arel (9.0.0 )
5061 ast (2.4.1 )
5162 autoprefixer-rails (9.7.6 )
7182 capybara (>= 1.0 , < 4 )
7283 launchy
7384 childprocess (3.0.0 )
74- chromedriver-helper (2.1.1 )
75- archive-zip (~> 0.10 )
76- nokogiri (~> 1.8 )
7785 code_analyzer (0.5.1 )
7886 sexp_processor
7987 coderay (1.1.3 )
115123 i18n (1.8.3 )
116124 concurrent-ruby (~> 1.0 )
117125 interception (0.5 )
118- io-like (0.3.1 )
119126 jbuilder (2.10.0 )
120127 activesupport (>= 5.0.0 )
121128 json (2.3.0 )
209216 rb-inotify (0.10.1 )
210217 ffi (~> 1.0 )
211218 rdoc (6.2.1 )
212- react_on_rails (12.0.0.pre.beta.1 )
213- addressable
214- connection_pool
215- execjs (~> 2.5 )
216- rails (>= 3.2 )
217- rainbow (~> 3.0 )
218219 redis (3.3.3 )
219220 regexp_parser (1.7.1 )
220221 require_all (3.0.0 )
310311 activemodel (>= 5.0 )
311312 bindex (>= 0.4.0 )
312313 railties (>= 5.0 )
314+ webdrivers (4.4.1 )
315+ nokogiri (~> 1.6 )
316+ rubyzip (>= 1.3.0 )
317+ selenium-webdriver (>= 3.0 , < 4.0 )
313318 webpacker (5.1.1 )
314319 activesupport (>= 5.2 )
315320 rack-proxy (>= 0.6.1 )
@@ -332,7 +337,6 @@ DEPENDENCIES
332337 bundler-audit
333338 capybara (= 2.18.0 )
334339 capybara-screenshot
335- chromedriver-helper
336340 coffee-rails
337341 coveralls
338342 database_cleaner
@@ -355,7 +359,7 @@ DEPENDENCIES
355359 rails-html-sanitizer
356360 rails_best_practices
357361 rainbow
358- react_on_rails ( = 12.0.0.pre.beta.1 )
362+ react_on_rails !
359363 redis (= 3.3.3 )
360364 rspec-rails (= 3.7.2 )
361365 rubocop
@@ -368,6 +372,7 @@ DEPENDENCIES
368372 spring-commands-rspec
369373 uglifier
370374 web-console
375+ webdrivers (~> 4.0 )
371376 webpacker
372377
373378RUBY VERSION
Original file line number Diff line number Diff line change 1+ #!/usr/bin/env ruby
2+
3+ ENV [ "RAILS_ENV" ] ||= ENV [ "RACK_ENV" ] || "development"
4+ ENV [ "NODE_ENV" ] ||= "development"
5+
6+ require "pathname"
7+ ENV [ "BUNDLE_GEMFILE" ] ||= File . expand_path ( "../../Gemfile" ,
8+ Pathname . new ( __FILE__ ) . realpath )
9+
10+ require "bundler/setup"
11+ require "webpacker"
12+ require "webpacker/webpack_runner"
13+
14+ APP_ROOT = File . expand_path ( ".." , __dir__ )
15+
16+ puts "bin/webpack is running #{ APP_ROOT } /bin/webpack.sh"
17+ exec "#{ APP_ROOT } /bin/webpack.sh"
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -euo pipefail
3+ IFS=$' \n\t '
4+
5+ __root=" $( dirname $( dirname $( realpath $0 ) ) ) "
6+ cd $__root
7+
8+ # echo BEFORE
9+ # echo RAILS_ENV is ${RAILS_ENV:-UNDEFINED}
10+ # echo NODE_ENV is ${NODE_ENV:-UNDEFINED}
11+
12+ # From default for bin/webpack from @rails/webpacker
13+ # ENV["RAILS_ENV"] ||= ENV["RACK_ENV"] || "development"
14+ # ENV["NODE_ENV"] ||= "development"
15+
16+ RAILS_ENV=${RAILS_ENV:- ${RACK_ENV:- development} }
17+ NODE_ENV=${NODE_ENV:- development}
18+
19+ echo Running $0
20+ echo RAILS_ENV is $RAILS_ENV , NODE_ENV is $NODE_ENV
21+
22+
23+ # if [[ $RAILS_ENV = "production" ]] ; then
24+ # yarn run build:production
25+ # fi
26+
27+ # if [[ $RAILS_ENV = "test" ]] ; then
28+ # yarn run build:test
29+ # fi
30+
31+ bundle exec rake react_on_rails:locale
32+
33+ # In case you have your build scripts in the /client subdirectory
34+ cd client
35+
36+ case $NODE_ENV in
37+ test)
38+ # rm -rf public/webpack/development || true
39+ yarn run build:test " $@ "
40+ ;;
41+ production)
42+ yarn run build:production " $@ "
43+ ;;
44+ * )
45+ yarn run build:dev " $@ "
46+ esac
Original file line number Diff line number Diff line change 44 "description" : " Code from the React Webpack tutorial." ,
55 "main" : " server-express.js" ,
66 "engines" : {
7- "node" : " ^7.8.0 || ^8.0.0 || ^9.2.0 || ^10.0.0 || ^11.0.0 " ,
7+ "node" : " 12 " ,
88 "yarn" : " ^1.0.0"
99 },
1010 "repository" : {
3131 "build:production:client" : " NODE_ENV=production webpack -p --config webpack.client.rails.build.config.js" ,
3232 "build:production:server" : " NODE_ENV=production webpack -p --config webpack.server.rails.build.config.js" ,
3333 "build:client" : " webpack --config webpack.client.rails.build.config.js" ,
34+ "build:dev" : " yarn run build:client && yarn run build:server" ,
3435 "build:dev:client" : " NODE_ENV=development webpack -w --config webpack.client.rails.build.config.js" ,
3536 "build:dev:server" : " NODE_ENV=development webpack -w --config webpack.server.rails.build.config.js" ,
3637 "build:server" : " webpack --config webpack.server.rails.build.config.js" ,
116117 "pug" : " ^2.0.0-rc.4" ,
117118 "react-transform-hmr" : " ^1.0.4" ,
118119 "regenerator-runtime" : " ^0.12.1" ,
119- "sleep" : " ^5.1.1 " ,
120+ "sleep" : " ^6.2.0 " ,
120121 "webpack-dev-server" : " ^2.9.4"
121122 },
122123 "jest" : {
Original file line number Diff line number Diff line change 60866086 resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
60876087 integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s=
60886088
6089- nan@>=2.12.1, nan@ ^2.12.1, nan@^2.13.2 :
6089+ nan@^2.12.1, nan@^2.13.2 :
60906090 version "2.14.1"
60916091 resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.1.tgz#d7be34dfa3105b91494c3147089315eff8874b01"
60926092 integrity sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==
@@ -8333,12 +8333,12 @@ slash@^1.0.0:
83338333 resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
83348334 integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU=
83358335
8336- sleep@^5.1.1 :
8337- version "5 .2.4 "
8338- resolved "https://registry.yarnpkg.com/sleep/-/sleep-5 .2.4 .tgz#d1922209f61a1f29bc910495d406e3697dd730ec "
8339- integrity sha512-SoltvxayTifWOgOGD6CTh+djcp5TaOa/zdbaA38wEH1ahF2azmiLOh8CPt6ExHf0pAJAsA9OCHTS7zK24Ym4yA ==
8336+ sleep@^6.2.0 :
8337+ version "6 .2.0 "
8338+ resolved "https://registry.yarnpkg.com/sleep/-/sleep-6 .2.0 .tgz#88029df49529b8aa3ea5b5a510d44921101579e5 "
8339+ integrity sha512-W4Rpfx82IGEa3lMQQPBbew0lvb0u3WY5geYzeVmIvNuc/y3YUcx2c02zZBOk+R8E318KAtYU/Ee5tqZwrKqZHg ==
83408340 dependencies :
8341- nan ">=2.12.1 "
8341+ nan "^2.13.2 "
83428342
8343834383448344 version "1.0.0"
Original file line number Diff line number Diff line change 11# Shown below are the defaults for configuration
22ReactOnRails . configure do |config |
3- config . node_modules_location = "client"
4-
53 # Define the files for we need to check for webpack compilation when running tests
64 config . webpack_generated_files = %w[ app-bundle.js vendor-bundle.js app-bundle.css
75 vendor-bundle.css server-bundle.js ]
1210 # not affect performance.
1311 config . server_bundle_js_file = "server-bundle.js"
1412
15- # If you are using the ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
16- # with rspec then this controls what npm command is run
17- # to automatically refresh your webpack assets on every test run.
18- config . build_test_command = "yarn run build:test"
19-
20- # This configures the script to run to build the production assets by webpack. Set this to nil
21- # if you don't want react_on_rails building this file for you.
22- config . build_production_command = "yarn run build:production"
23-
2413 ################################################################################
2514 # CLIENT RENDERING OPTIONS
2615 # Below options can be overriden by passing options to the react_on_rails
You can’t perform that action at this time.
0 commit comments