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.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/.bookignore +0 -1
  3. data/.gitignore +2 -0
  4. data/.travis.yml +3 -3
  5. data/CHANGELOG.md +6 -1
  6. data/CONTRIBUTING.md +15 -35
  7. data/Gemfile +0 -1
  8. data/PROJECTS.md +5 -1
  9. data/README.md +9 -9
  10. data/SUMMARY.md +1 -1
  11. data/app/helpers/react_on_rails_helper.rb +20 -27
  12. data/docs/additional-reading/heroku-deployment.md +1 -1
  13. data/docs/additional-reading/hot-reloading-rails-development.md +4 -4
  14. data/docs/additional-reading/node-dependencies-and-npm.md +8 -18
  15. data/docs/additional-reading/node-server-rendering.md +1 -1
  16. data/docs/additional-reading/rspec-configuration.md +3 -3
  17. data/docs/additional-reading/turbolinks.md +2 -2
  18. data/docs/additional-reading/updating-dependencies.md +4 -6
  19. data/docs/contributor-info/generator-testing.md +1 -1
  20. data/docs/tutorial.md +6 -4
  21. data/lib/generators/USAGE +2 -2
  22. data/lib/generators/react_on_rails/base_generator.rb +2 -2
  23. data/lib/generators/react_on_rails/dev_tests_generator.rb +1 -1
  24. data/lib/generators/react_on_rails/install_generator.rb +3 -3
  25. data/lib/generators/react_on_rails/templates/base/base/Procfile.dev.tt +1 -1
  26. data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb.tt +3 -3
  27. data/lib/generators/react_on_rails/templates/base/base/package.json.tt +1 -1
  28. data/lib/react_on_rails/test_helper.rb +1 -1
  29. data/lib/react_on_rails/test_helper/node_process_launcher.rb +1 -1
  30. data/lib/react_on_rails/version.rb +1 -1
  31. data/lib/react_on_rails/version_checker.rb +1 -1
  32. data/package.json +13 -13
  33. data/rakelib/dummy_apps.rake +2 -2
  34. data/rakelib/example_type.rb +2 -2
  35. data/rakelib/examples.rake +2 -2
  36. data/rakelib/lint.rake +2 -2
  37. data/rakelib/node_package.rake +1 -1
  38. data/rakelib/release.rake +5 -5
  39. data/rakelib/run_rspec.rake +3 -3
  40. data/react_on_rails.gemspec +0 -2
  41. data/yarn.lock +359 -1066
  42. metadata +4 -19
  43. 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 npm start script in `client/node/package.json`
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 npm command is run
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 = "npm run build:test"
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 `npm 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:
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 npm (recommended) or via the gem.
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 npm 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".
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 `npm outdated` and read CHANGELOGs of major updated packages before you update. You might not be ready for some updates.
17
- 1. Run these commands. Note, you may or may not want to remove your npm-shrinkwrap.json if you get some werid conflicts, and you may or may not need to `rm -rf` your `node_modules` directory.
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
- npm i
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 && npm i
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 `npm install`, 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. When running `npm install`, this may produce strange-looking output due to the way the npm's console progress bar works. This is normal.
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 && npm install
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 && npm i
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 npm are up to date.
141
+ - Ensure your bundle and yarn installs of dependencies are up to date.
142
142
 
143
- bundle && npm i
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 npm`.blank? : `which npm`.blank?
68
- error = "npm is required. Please install it before continuing. "
69
- error << "https://www.npmjs.com/"
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 && npm run build:development'
2
+ client: sh -c 'rm app/assets/webpack/* || true && cd client && yarn run build:development'
@@ -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 npm command is run
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 = "npm run build:test"
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 = "npm run build:production"
25
+ config.npm_build_production_command = "yarn run build:production"
26
26
 
27
27
  ################################################################################
28
28
  # CLIENT RENDERING OPTIONS
@@ -7,7 +7,7 @@
7
7
  "npm": "4.1.1"
8
8
  },
9
9
  "scripts": {
10
- "postinstall": "cd client && npm install",
10
+ "postinstall": "cd client && yarn install",
11
11
  "rails-server": "echo 'visit http://localhost:3000/hello_world' && foreman start -f Procfile.dev",
12
12
  "test": "rspec"
13
13
  }
@@ -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 `npm run build:client` (and `npm run build:server` if doing server
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.
@@ -5,7 +5,7 @@ module ReactOnRails
5
5
 
6
6
  path = "#{::Rails.root}/client/node"
7
7
  puts "Launching NodeJS server at #{path}"
8
- system("cd #{path} && npm start &")
8
+ system("cd #{path} && yarn start &")
9
9
  sleep(1)
10
10
  end
11
11
  end
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ReactOnRails
3
- VERSION = "6.6.0.alpha.1".freeze
3
+ VERSION = "6.6.0".freeze
4
4
  end
@@ -1,5 +1,5 @@
1
1
  module ReactOnRails
2
- # Responsible for checking versions of rubygem versus npm node package
2
+ # Responsible for checking versions of rubygem versus yarn node package
3
3
  # against each otherat runtime.
4
4
  class VersionChecker
5
5
  attr_reader :node_package_version, :logger
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-on-rails",
3
- "version": "6.6.0-alpha.1",
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.12.2",
24
+ "eslint": "^3.9.1",
25
25
  "eslint-config-shakacode": "^13.2.1",
26
- "eslint-plugin-import": "^2.2.0",
27
- "eslint-plugin-jsx-a11y": "^3.0.2",
28
- "eslint-plugin-react": "^6.8.0",
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": "npm run build",
51
+ "prepublish": "yarn run build",
52
52
  "babel": "babel --out-dir node_package/lib node_package/src",
53
- "build": "npm run clean && npm run babel",
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": "npm run eslint",
58
- "check": "npm run lint && npm run flow && npm run test",
59
- "prerelease": "npm run check && npm run clean && npm run build",
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 npm run dummy:install' && npm run build && cd spec/dummy && foreman start"
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",
@@ -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, "npm install")
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, "npm install")
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
@@ -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, npm install, and generating the webpack bundles
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("$(npm bin)", "webpack")
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
@@ -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, "npm install")
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, `npm install`s, and generates webpack bundles)"
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, "npm run eslint")
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, "npm run flow")
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"
@@ -3,7 +3,7 @@ include ReactOnRails::TaskHelpers
3
3
 
4
4
  namespace :node_package do
5
5
  task :build do
6
- sh "npm run build"
6
+ sh "yarn run build"
7
7
  end
8
8
  end
9
9
 
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 npm semver by the rake task
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` (npm version would be `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 `npm install`
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 npm version, commit, tag the commit, push to repo, and release on npm
58
- release_it_command = "$(npm bin)/release-it --non-interactive --npm.publish"
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)
@@ -72,9 +72,9 @@ namespace :run_rspec do
72
72
  end
73
73
  end
74
74
 
75
- desc "js tests (same as 'npm run test')"
75
+ desc "js tests (same as 'yarn run test')"
76
76
  task :js_tests do
77
- sh "npm run test"
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, "npm run build:clean")
112
+ sh_in_dir(path.realpath, "yarn run build:clean")
113
113
  end
@@ -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