Skip to content

Commit

Permalink
Merge pull request #812 from BookOfGreg/prebundle-the-correct-react
Browse files Browse the repository at this point in the history
Prepare for 2.4.0
  • Loading branch information
BookOfGreg authored Oct 22, 2017
2 parents 2d53816 + 123b0aa commit 16503ee
Show file tree
Hide file tree
Showing 10 changed files with 22,452 additions and 36,141 deletions.
28 changes: 27 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,33 @@

#### Breaking Changes

- React Deprecations for 15.4, 15.5, 15.6 in preparation for 16 handled in prebundled version
#### New Features

#### Deprecation

#### Bug Fixes

## 2.4.0

#### Breaking Changes

- (Sprockets) Prebundled React upgraded to 16 #792
- (Sprockets) Addons removed # 792

#### New Features

#### Deprecation

#### Bug Fixes

- Coffeescript generator exports correctly #799, #800
- Running detector manually no longer breaks if Turbolinks is not preset #802

## 2.3.1

#### Breaking Changes

- React Deprecations for 15.4, 15.5, 15.6 in preparation for 16 handled in prebundled version #789, #798

#### New Features

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@
[![Code Climate](https://img.shields.io/codeclimate/github/reactjs/react-rails.svg?style=flat-square)](https://codeclimate.com/github/reactjs/react-rails)
[![Test Coverage](https://img.shields.io/codeclimate/coverage/github/reactjs/react-rails.svg?style=flat-square)](https://codeclimate.com/github/reactjs/react-rails/coverage)

Gem version 2.4.x onwards and master will no longer have React Addons.

If you need to make changes for the prebundled react, see the migration docs here:
https://reactjs.org/blog/2016/11/16/react-v15.4.0.html
https://reactjs.org/blog/2017/04/07/react-v15.5.0.html
https://reactjs.org/blog/2017/06/13/react-v15.6.0.html

`react-rails` makes it easy to use [React](http://facebook.github.io/react/) and [JSX](http://facebook.github.io/react/docs/jsx-in-depth.html) in your Ruby on Rails (3.2+) application. Learn more:

- React's [Getting Started guide](https://facebook.github.io/react/docs/getting-started.html)
Expand Down
17 changes: 12 additions & 5 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,22 @@ def copy_react_asset(webpack_file, destination_file)
FileUtils.cp(full_webpack_path, full_destination_path)
end

# Move to `dirname` and execute `yarn {cmd}`
def yarn_run_in(dirname, cmd)
Dir.chdir(dirname) do
`yarn #{cmd}`
end
end

namespace :react do
desc 'Run the JS build process to put files in the gem source'
task update: [:install, :build, :copy]

desc 'Install the JavaScript dependencies'
task :install do
yarn_run_in('react-builds', 'upgrade')
end

desc 'Build the JS bundles with Webpack'
task :build do
yarn_run_in('react-builds', 'build')
Expand All @@ -29,11 +41,6 @@ namespace :react do
copy_react_asset("#{environment}/react-server.js", "#{environment}/react-server.js")
end
end

desc 'Install the JavaScript dependencies'
task :install do
yarn_run_in('react-builds', 'upgrade')
end
end

namespace :ujs do
Expand Down
4 changes: 3 additions & 1 deletion VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ You can control what version of React.js (and JSXTransformer) is used by `react-

| Gem | React.js |
|----------|----------|
| master | 15.6.2 |
| master | 16.0.0 |
| 2.4.0 | 16.0.0 |
| 2.3.1 | 15.6.2 | Updated Addons
| 2.3.0 | 15.6.2 |
| 2.2.1 | 15.4.2 |
| 2.2.0 | 15.4.2 |
Expand Down
22,882 changes: 4,579 additions & 18,303 deletions lib/assets/react-source/development/react-server.js

Large diffs are not rendered by default.

35,604 changes: 17,815 additions & 17,789 deletions lib/assets/react-source/development/react.js

Large diffs are not rendered by default.

22 changes: 2 additions & 20 deletions lib/assets/react-source/production/react-server.js

Large diffs are not rendered by default.

25 changes: 5 additions & 20 deletions lib/assets/react-source/production/react.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/react/rails/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module React
module Rails
# If you change this, make sure to update VERSIONS.md
# and republish the UJS by updating package.json and `bundle exec rake ujs:publish`
VERSION = '2.3.0'
VERSION = '2.4.0'
end
end
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react_ujs",
"version": "2.3.1",
"version": "2.4.0",
"description": "Rails UJS for the react-rails gem",
"main": "react_ujs/index.js",
"files": [
Expand Down

0 comments on commit 16503ee

Please sign in to comment.