react_on_rails 6.6.0.alpha.1 → 6.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.bookignore +0 -1
- data/.gitignore +2 -0
- data/.travis.yml +3 -3
- data/CHANGELOG.md +6 -1
- data/CONTRIBUTING.md +15 -35
- data/Gemfile +0 -1
- data/PROJECTS.md +5 -1
- data/README.md +9 -9
- data/SUMMARY.md +1 -1
- data/app/helpers/react_on_rails_helper.rb +20 -27
- data/docs/additional-reading/heroku-deployment.md +1 -1
- data/docs/additional-reading/hot-reloading-rails-development.md +4 -4
- data/docs/additional-reading/node-dependencies-and-npm.md +8 -18
- data/docs/additional-reading/node-server-rendering.md +1 -1
- data/docs/additional-reading/rspec-configuration.md +3 -3
- data/docs/additional-reading/turbolinks.md +2 -2
- data/docs/additional-reading/updating-dependencies.md +4 -6
- data/docs/contributor-info/generator-testing.md +1 -1
- data/docs/tutorial.md +6 -4
- data/lib/generators/USAGE +2 -2
- data/lib/generators/react_on_rails/base_generator.rb +2 -2
- data/lib/generators/react_on_rails/dev_tests_generator.rb +1 -1
- data/lib/generators/react_on_rails/install_generator.rb +3 -3
- data/lib/generators/react_on_rails/templates/base/base/Procfile.dev.tt +1 -1
- data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt +3 -3
- data/lib/generators/react_on_rails/templates/base/base/package.json.tt +1 -1
- data/lib/react_on_rails/test_helper.rb +1 -1
- data/lib/react_on_rails/test_helper/node_process_launcher.rb +1 -1
- data/lib/react_on_rails/version.rb +1 -1
- data/lib/react_on_rails/version_checker.rb +1 -1
- data/package.json +13 -13
- data/rakelib/dummy_apps.rake +2 -2
- data/rakelib/example_type.rb +2 -2
- data/rakelib/examples.rake +2 -2
- data/rakelib/lint.rake +2 -2
- data/rakelib/node_package.rake +1 -1
- data/rakelib/release.rake +5 -5
- data/rakelib/run_rspec.rake +3 -3
- data/react_on_rails.gemspec +0 -2
- data/yarn.lock +359 -1066
- metadata +4 -19
- data/npm-shrinkwrap.json +0 -4177
@@ -30,7 +30,7 @@ config.server_render_method = "NodeJS"
|
|
30
30
|
|
31
31
|
You need to configure the name of the server bundle in two places:
|
32
32
|
|
33
|
-
1. JavaScript: Change the name of server bundle adjust
|
33
|
+
1. JavaScript: Change the name of server bundle and adjust yarn start script in `client/node/package.json`
|
34
34
|
2. Ruby: The configured server bundle file is defined in `config/react_on_rails.rb`, and you'll have a webpack file that creates this. You maybe using the same file for client rendering.
|
35
35
|
|
36
36
|
```ruby
|
@@ -25,12 +25,12 @@ The following `config/react_on_rails.rb` settings **must** match your setup:
|
|
25
25
|
config.webpack_generated_files = %w( webpack-bundle.js )
|
26
26
|
|
27
27
|
# If you are using the ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
|
28
|
-
# with rspec then this controls what
|
28
|
+
# with rspec then this controls what yarn command is run
|
29
29
|
# to automatically refresh your webpack assets on every test run.
|
30
|
-
config.npm_build_test_command = "
|
30
|
+
config.npm_build_test_command = "yarn run build:test"
|
31
31
|
```
|
32
32
|
|
33
|
-
If you want to speed up the re-compiling process, you can call `
|
33
|
+
If you want to speed up the re-compiling process, you can call `yarn run build:development` (per below script) to have webpack run in "watch" mode and recompile these files in the background, which will be much faster when making incremental changes than compiling from scratch, assuming you have your setup like this:
|
34
34
|
|
35
35
|
```
|
36
36
|
"scripts": {
|
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
* See [Turbolinks on Github](https://github.com/rails/turbolinks)
|
4
4
|
* Currently support 2.5.x of Turbolinks and 5.0.0 of Turbolinks 5.
|
5
|
-
* You may include Turbolinks either via
|
5
|
+
* You may include Turbolinks either via yarn (recommended) or via the gem.
|
6
6
|
|
7
7
|
## Why Turbolinks?
|
8
8
|
As you switch between Rails HTML controller requests, you will only load the HTML and you will
|
@@ -23,7 +23,7 @@ the JavaScript and stylesheets are cached by the browser, as they will still req
|
|
23
23
|
* If you're using multiple Webpack bundles, be sure to ensure that there are no name conflicts between JS objects or redux store paths.
|
24
24
|
|
25
25
|
### Install Checklist
|
26
|
-
1. Include turbolinks via
|
26
|
+
1. Include turbolinks via yarn as shown in the [react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/blob/8a6c8aa2e3b7ae5b08b0a9744fb3a63a2fe0f002/client/webpack.client.base.config.js#L22) or include the gem "turbolinks".
|
27
27
|
1. Included the proper "track" tags when you include the javascript and stylesheet:
|
28
28
|
```erb
|
29
29
|
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => 'reload' %>
|
@@ -13,21 +13,19 @@ bundle update
|
|
13
13
|
## NPM
|
14
14
|
|
15
15
|
1. Install [npm-check-updates](https://www.npmjs.com/package/npm-check-updates)
|
16
|
-
1. Run `
|
17
|
-
1. Run these commands.
|
16
|
+
1. Run `yarn outdated` and read CHANGELOGs of major updated packages before you update. You might not be ready for some updates.
|
17
|
+
1. Run these commands. You may or may not need to `rm -rf` your `node_modules` directory.
|
18
18
|
|
19
19
|
```
|
20
20
|
cd client
|
21
|
-
rm npm-shrinkwrap.json
|
22
21
|
ncu -u -a
|
23
|
-
|
22
|
+
yarn
|
24
23
|
```
|
25
24
|
|
26
25
|
Some combinations that I often run:
|
27
26
|
|
28
27
|
### remove old installed `node_modules` so you only get what corresponds to package.json
|
29
28
|
```
|
30
|
-
ncu -u -a && rm -rf node_modules &&
|
29
|
+
ncu -u -a && rm -rf node_modules && yarn
|
31
30
|
```
|
32
31
|
|
33
|
-
Note: newer versions of npm (>3) automatically create a new version of the npm-shrinkwrap.json.
|
@@ -12,7 +12,7 @@ You can specify additional apps to generate and test by adding to the rakelib/ex
|
|
12
12
|
## More on the Rake Tasks
|
13
13
|
In order to maximize efficiency, we took several steps to improve the performance of the rake tasks that utilize somewhat advanced rake functionality such as task dependencies, `file` tasks, task synthesizing, and concurrent tasks with `multitask`.
|
14
14
|
|
15
|
-
For example, re-generating the app, running `
|
15
|
+
For example, re-generating the app, running `yarn`, and re-generating the webpack bundles are all only done when they need to be done. Rake will also run certain tasks, including those that generate multiple applications, concurrently.
|
16
16
|
|
17
17
|
For more insight, see:
|
18
18
|
|
data/docs/tutorial.md
CHANGED
@@ -19,6 +19,8 @@ By the time you read this, the latest may have changed. Be sure to check the ver
|
|
19
19
|
* https://rubygems.org/gems/react_on_rails
|
20
20
|
* https://www.npmjs.com/package/react-on-rails
|
21
21
|
|
22
|
+
_Note: some of the screen images below show the "npm" command. react_on_rails 6.6.0 and greater uses `yarn`._
|
23
|
+
|
22
24
|
##Setting up the environment
|
23
25
|
|
24
26
|
Trying out **React on Rails** is super easy, so long as you have the basic prerequisites. This includes the basics for Rails 4.x and node version 5+. I recommend `rvm` and `nvm` to install Ruby and Node. Rails can be installed as ordinary gem.
|
@@ -33,6 +35,7 @@ rvm use 2.3.1 --default # use it and make it default
|
|
33
35
|
rvm list # check
|
34
36
|
|
35
37
|
gem install rails # download and install latest stable Rails
|
38
|
+
gem install foreman # download and install Foreman
|
36
39
|
```
|
37
40
|
|
38
41
|
Then we need to create a fresh Rails application as following:
|
@@ -69,7 +72,7 @@ update dependencies and generate empty app via `react_on_rails:install`. If you
|
|
69
72
|
```
|
70
73
|
bundle
|
71
74
|
rails generate react_on_rails:install
|
72
|
-
bundle &&
|
75
|
+
bundle && yarn
|
73
76
|
```
|
74
77
|
|
75
78
|
![03](https://cloud.githubusercontent.com/assets/20628911/17464918/3c2c1f00-5cf2-11e6-9525-7b2e15659e01.png)
|
@@ -82,14 +85,13 @@ foreman start -f Procfile.dev
|
|
82
85
|
|
83
86
|
![04](https://cloud.githubusercontent.com/assets/20628911/17464921/3c2fdb40-5cf2-11e6-9343-6afa53593a70.png)
|
84
87
|
|
85
|
-
|
86
88
|
Visit http://localhost:3000/hello_world and see your **React On Rails** app running!
|
87
89
|
|
88
90
|
![05](https://cloud.githubusercontent.com/assets/20628911/17464920/3c2e8ae2-5cf2-11e6-9e30-5ec5f9e2cbc6.png)
|
89
91
|
|
90
92
|
### Custom IP & PORT setup (Cloud9 example)
|
91
93
|
|
92
|
-
In case you are running some custom setup with different IP or PORT you should also edit Procfile.dev. For example to be able to run on free Cloud9 IDE we are putting IP 0.0.0.0 and PORT 8080
|
94
|
+
In case you are running some custom setup with different IP or PORT you should also edit Procfile.dev. For example to be able to run on free Cloud9 IDE we are putting IP 0.0.0.0 and PORT 8080. The default generated file `Procfile.dev` uses `-p 3000`.
|
93
95
|
|
94
96
|
``` Procfile.dev
|
95
97
|
web: rails s -p 8080 -b 0.0.0.0
|
@@ -192,4 +194,4 @@ Here it is:
|
|
192
194
|
* [Source code for this sample app](https://github.com/dzirtusss/hello-react-on-rails)
|
193
195
|
* [Live on Heroku](https://hello-react-on-rails.herokuapp.com/)
|
194
196
|
|
195
|
-
Feedback is greatly appreciated! As are stars on github!
|
197
|
+
Feedback is greatly appreciated! As are stars on github! If you want personalized help, don't hesitate to get in touch with us at [contact@shakacode.com](mailto:contact@shakacode.com).
|
data/lib/generators/USAGE
CHANGED
@@ -11,13 +11,13 @@ can pass the redux option if you'd like to have redux setup for you automaticall
|
|
11
11
|
|
12
12
|
* Node
|
13
13
|
|
14
|
-
Passing the --node generator option sets up the necessary files for node to render the react_components.
|
14
|
+
Passing the --node generator option sets up the necessary files for node to render the react_components.
|
15
15
|
|
16
16
|
*******************************************************************************
|
17
17
|
|
18
18
|
After running the generator, you will want to:
|
19
19
|
|
20
|
-
bundle &&
|
20
|
+
bundle && yarn
|
21
21
|
|
22
22
|
Then you may run
|
23
23
|
|
@@ -138,9 +138,9 @@ Rails.application.config.assets.paths << Rails.root.join("app", "assets", "webpa
|
|
138
138
|
|
139
139
|
What to do next:
|
140
140
|
|
141
|
-
- Ensure your bundle and
|
141
|
+
- Ensure your bundle and yarn installs of dependencies are up to date.
|
142
142
|
|
143
|
-
bundle &&
|
143
|
+
bundle && yarn
|
144
144
|
|
145
145
|
- Run the foreman command to start the rails server and run webpack in watch mode.
|
146
146
|
|
@@ -30,7 +30,7 @@ module ReactOnRails
|
|
30
30
|
package_json = File.join(destination_root, "client", "package.json")
|
31
31
|
old_contents = File.read(package_json)
|
32
32
|
new_contents = old_contents.gsub(/"react-on-rails": ".+",/,
|
33
|
-
'"react-on-rails": "
|
33
|
+
'"react-on-rails": "file:../../../..",')
|
34
34
|
File.open(package_json, "w+") { |f| f.puts new_contents }
|
35
35
|
end
|
36
36
|
|
@@ -64,9 +64,9 @@ module ReactOnRails
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def missing_npm?
|
67
|
-
return false unless ReactOnRails::Utils.running_on_windows? ? `where
|
68
|
-
error = "
|
69
|
-
error << "https://
|
67
|
+
return false unless ReactOnRails::Utils.running_on_windows? ? `where yarn`.blank? : `which yarn`.blank?
|
68
|
+
error = "yarn is required. Please install it before continuing. "
|
69
|
+
error << "https://yarnpkg.com/en/docs/install"
|
70
70
|
GeneratorMessages.add_error(error)
|
71
71
|
true
|
72
72
|
end
|
@@ -1,2 +1,2 @@
|
|
1
1
|
web: rails s -p 3000
|
2
|
-
client: sh -c 'rm app/assets/webpack/* || true && cd client &&
|
2
|
+
client: sh -c 'rm app/assets/webpack/* || true && cd client && yarn run build:development'
|
data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt
CHANGED
@@ -16,13 +16,13 @@ ReactOnRails.configure do |config|
|
|
16
16
|
config.server_bundle_js_file = "webpack-bundle.js"
|
17
17
|
|
18
18
|
# If you are using the ReactOnRails::TestHelper.configure_rspec_to_compile_assets(config)
|
19
|
-
# with rspec then this controls what
|
19
|
+
# with rspec then this controls what yarn command is run
|
20
20
|
# to automatically refresh your webpack assets on every test run.
|
21
|
-
config.npm_build_test_command = "
|
21
|
+
config.npm_build_test_command = "yarn run build:test"
|
22
22
|
|
23
23
|
# This configures the script to run to build the production assets by webpack. Set this to nil
|
24
24
|
# if you don't want react_on_rails building this file for you.
|
25
|
-
config.npm_build_production_command = "
|
25
|
+
config.npm_build_production_command = "yarn run build:production"
|
26
26
|
|
27
27
|
################################################################################
|
28
28
|
# CLIENT RENDERING OPTIONS
|
@@ -19,7 +19,7 @@ module ReactOnRails
|
|
19
19
|
# once per test run.
|
20
20
|
#
|
21
21
|
# If you do not want to be slowed down by re-compiling webpack assets from scratch every test
|
22
|
-
# run, you can call `
|
22
|
+
# run, you can call `yarn run build:client` (and `yarn run build:server` if doing server
|
23
23
|
# rendering) to have webpack recompile these files in the background, which will be *much*
|
24
24
|
# faster. The helper looks for these processes and will abort recompiling if it finds them
|
25
25
|
# to be running.
|
data/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "react-on-rails",
|
3
|
-
"version": "6.6.0
|
3
|
+
"version": "6.6.0",
|
4
4
|
"description": "react-on-rails JavaScript for react_on_rails Ruby gem",
|
5
5
|
"main": "node_package/lib/ReactOnRails.js",
|
6
6
|
"directories": {
|
@@ -21,11 +21,11 @@
|
|
21
21
|
"babel-types": "^6.21.0",
|
22
22
|
"babelify": "^7.3.0",
|
23
23
|
"blue-tape": "^1.0.0",
|
24
|
-
"eslint": "^3.
|
24
|
+
"eslint": "^3.9.1",
|
25
25
|
"eslint-config-shakacode": "^13.2.1",
|
26
|
-
"eslint-plugin-import": "^2.
|
27
|
-
"eslint-plugin-jsx-a11y": "^
|
28
|
-
"eslint-plugin-react": "^6.
|
26
|
+
"eslint-plugin-import": "^2.1.0",
|
27
|
+
"eslint-plugin-jsx-a11y": "^2.2.3",
|
28
|
+
"eslint-plugin-react": "^6.6.0",
|
29
29
|
"flow-bin": "^0.37.4",
|
30
30
|
"jsdom": "^9.9.1",
|
31
31
|
"react": "^15.4.1",
|
@@ -38,9 +38,9 @@
|
|
38
38
|
"webpack": "^1.14.0"
|
39
39
|
},
|
40
40
|
"peerDependencies": {
|
41
|
+
"babel-runtime": ">= 6",
|
41
42
|
"react": ">= 0.14",
|
42
|
-
"react-dom": ">= 0.14"
|
43
|
-
"babel-runtime": ">= 6"
|
43
|
+
"react-dom": ">= 0.14"
|
44
44
|
},
|
45
45
|
"files": [
|
46
46
|
"node_package/lib"
|
@@ -48,21 +48,21 @@
|
|
48
48
|
"scripts": {
|
49
49
|
"test": "babel-tape-runner -r node_package/tests/helpers/test_helper.js node_package/tests/*.js | tap-spec",
|
50
50
|
"clean": "rm -rf node_package/lib",
|
51
|
-
"prepublish": "
|
51
|
+
"prepublish": "yarn run build",
|
52
52
|
"babel": "babel --out-dir node_package/lib node_package/src",
|
53
|
-
"build": "
|
53
|
+
"build": "yarn run clean && yarn run babel",
|
54
54
|
"build-watch": "babel --watch --out-dir node_package/lib node_package/src",
|
55
55
|
"eslint": "eslint .",
|
56
56
|
"flow": "flow check node_package",
|
57
|
-
"lint": "
|
58
|
-
"check": "
|
59
|
-
"prerelease": "
|
57
|
+
"lint": "yarn run eslint && yarn run flow",
|
58
|
+
"check": "yarn run lint && yarn run flow && yarn run test",
|
59
|
+
"prerelease": "yarn run check && yarn run clean && yarn run build",
|
60
60
|
"release:patch": "node_package/scripts/release patch",
|
61
61
|
"release:minor": "node_package/scripts/release minor",
|
62
62
|
"release:major": "node_package/scripts/release major",
|
63
63
|
"dummy:install": "rake dummy_apps",
|
64
64
|
"dummy:spec": "rake run_rspec:dummy",
|
65
|
-
"local": "echo 'Be sure to run
|
65
|
+
"local": "echo 'Be sure to run yarn run dummy:install' && yarn run build && cd spec/dummy && foreman start"
|
66
66
|
},
|
67
67
|
"repository": {
|
68
68
|
"type": "git",
|
data/rakelib/dummy_apps.rake
CHANGED
@@ -5,13 +5,13 @@ namespace :dummy_apps do
|
|
5
5
|
task :dummy_app do
|
6
6
|
dummy_app_dir = File.join(gem_root, "spec/dummy")
|
7
7
|
bundle_install_in(dummy_app_dir)
|
8
|
-
sh_in_dir(dummy_app_dir, "
|
8
|
+
sh_in_dir(dummy_app_dir, "yarn install --mutex network")
|
9
9
|
end
|
10
10
|
|
11
11
|
task :dummy_app_with_turbolinks_5 do
|
12
12
|
dummy_app_dir = File.join(gem_root, "spec/dummy")
|
13
13
|
bundle_install_with_turbolinks_5_in(dummy_app_dir)
|
14
|
-
sh_in_dir(dummy_app_dir, "
|
14
|
+
sh_in_dir(dummy_app_dir, "yarn install --mutex network")
|
15
15
|
end
|
16
16
|
|
17
17
|
task dummy_apps: [:dummy_app, :node_package] do
|
data/rakelib/example_type.rb
CHANGED
@@ -115,7 +115,7 @@ module ReactOnRails
|
|
115
115
|
end
|
116
116
|
|
117
117
|
# generated files plus explicitly included files resulting from running
|
118
|
-
# bundle install,
|
118
|
+
# bundle install, yarn, and generating the webpack bundles
|
119
119
|
def prepared_files
|
120
120
|
generated_files
|
121
121
|
.include(webpack_bundles)
|
@@ -129,7 +129,7 @@ module ReactOnRails
|
|
129
129
|
|
130
130
|
# Assumes we are inside client folder
|
131
131
|
def build_webpack_bundles_shell_commands
|
132
|
-
webpack_command = File.join("$(
|
132
|
+
webpack_command = File.join("$(yarn bin)", "webpack")
|
133
133
|
shell_commands = []
|
134
134
|
shell_commands << "#{webpack_command} --config webpack.config.js"
|
135
135
|
end
|
data/rakelib/examples.rake
CHANGED
@@ -43,7 +43,7 @@ namespace :examples do
|
|
43
43
|
# NPM INSTALL
|
44
44
|
task example_type.npm_install_task_name_short => example_type.package_json do
|
45
45
|
unless uptodate?(example_type.node_modules_dir, [example_type.source_package_json])
|
46
|
-
sh_in_dir(example_type.client_dir, "
|
46
|
+
sh_in_dir(example_type.client_dir, "yarn install --mutex network")
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
@@ -71,7 +71,7 @@ namespace :examples do
|
|
71
71
|
end
|
72
72
|
|
73
73
|
# PREPARE
|
74
|
-
desc "Prepares #{example_type.name_pretty} (generates example, `
|
74
|
+
desc "Prepares #{example_type.name_pretty} (generates example, `yarn`s, and generates webpack bundles)"
|
75
75
|
multitask example_type.prepare_task_name_short => example_type.prepared_files do
|
76
76
|
Rake::Task["node_package"].invoke
|
77
77
|
end
|
data/rakelib/lint.rake
CHANGED
@@ -20,12 +20,12 @@ namespace :lint do
|
|
20
20
|
|
21
21
|
desc "Run eslint as shell"
|
22
22
|
task :eslint do
|
23
|
-
sh_in_dir(gem_root, "
|
23
|
+
sh_in_dir(gem_root, "yarn run eslint")
|
24
24
|
end
|
25
25
|
|
26
26
|
desc "Run flow from shell"
|
27
27
|
task :flow do
|
28
|
-
sh_in_dir(gem_root, "
|
28
|
+
sh_in_dir(gem_root, "yarn run flow")
|
29
29
|
end
|
30
30
|
|
31
31
|
desc "Run all eslint, flow, rubocop linters. Skip ruby-lint and scss"
|
data/rakelib/node_package.rake
CHANGED
data/rakelib/release.rake
CHANGED
@@ -7,12 +7,12 @@ require_relative File.join(gem_root, "lib", "react_on_rails", "utils")
|
|
7
7
|
desc("Releases both the gem and node package using the given version.
|
8
8
|
|
9
9
|
IMPORTANT: the gem version must be in valid rubygem format (no dashes).
|
10
|
-
It will be automatically converted to a valid
|
10
|
+
It will be automatically converted to a valid yarn semver by the rake task
|
11
11
|
for the node package version. This only makes a difference for pre-release
|
12
|
-
versions such as `3.0.0.beta.1` (
|
12
|
+
versions such as `3.0.0.beta.1` (yarn version would be `3.0.0-beta.1`).
|
13
13
|
|
14
14
|
This task depends on the gem-release (ruby gem) and release-it (node package)
|
15
|
-
which are installed via `bundle install` and `
|
15
|
+
which are installed via `bundle install` and `yarn`
|
16
16
|
|
17
17
|
1st argument: The new version in rubygem format (no dashes). Pass no argument to
|
18
18
|
automatically perform a patch version bump.
|
@@ -54,8 +54,8 @@ task :release, [:gem_version, :dry_run, :tools_install] do |_t, args|
|
|
54
54
|
# Stage changes so far
|
55
55
|
sh_in_dir(gem_root, "git add .")
|
56
56
|
|
57
|
-
# Will bump the
|
58
|
-
release_it_command = "$(
|
57
|
+
# Will bump the yarn version, commit, tag the commit, push to repo, and release on yarn
|
58
|
+
release_it_command = "$(yarn bin)/release-it --non-interactive --npm.publish"
|
59
59
|
release_it_command << " --dry-run --verbose" if is_dry_run
|
60
60
|
release_it_command << " #{npm_version}" unless npm_version.strip.empty?
|
61
61
|
sh_in_dir(gem_root, release_it_command)
|
data/rakelib/run_rspec.rake
CHANGED
@@ -72,9 +72,9 @@ namespace :run_rspec do
|
|
72
72
|
end
|
73
73
|
end
|
74
74
|
|
75
|
-
desc "js tests (same as '
|
75
|
+
desc "js tests (same as 'yarn run test')"
|
76
76
|
task :js_tests do
|
77
|
-
sh "
|
77
|
+
sh "yarn run test"
|
78
78
|
end
|
79
79
|
|
80
80
|
desc "Runs all tests. Run `rake -D run_rspec` to see all available test options"
|
@@ -109,5 +109,5 @@ end
|
|
109
109
|
|
110
110
|
def clean_gen_assets(dir)
|
111
111
|
path = calc_path(dir)
|
112
|
-
sh_in_dir(path.realpath, "
|
112
|
+
sh_in_dir(path.realpath, "yarn run build:clean")
|
113
113
|
end
|
data/react_on_rails.gemspec
CHANGED
@@ -26,7 +26,6 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_dependency "rainbow", "~> 2.1"
|
27
27
|
s.add_dependency "rails", ">= 3.2"
|
28
28
|
s.add_dependency "addressable"
|
29
|
-
s.add_dependency "yajl-ruby"
|
30
29
|
|
31
30
|
s.add_development_dependency "bundler", "~> 1.10"
|
32
31
|
s.add_development_dependency "rake", "~> 10.0"
|
@@ -43,5 +42,4 @@ Gem::Specification.new do |s|
|
|
43
42
|
s.add_development_dependency "binding_of_caller"
|
44
43
|
s.add_development_dependency "awesome_print"
|
45
44
|
s.add_development_dependency "gem-release"
|
46
|
-
|
47
45
|
end
|