react_on_rails 6.8.1 → 6.8.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dc8f8c909150f3c94e83be4c4bfd84e825719bd9
4
- data.tar.gz: a781fe780fcbed2447441b0f897f6b8b7dd2a2f1
3
+ metadata.gz: 330b3bfdba74e7185714c89c06b0e6ed85511d55
4
+ data.tar.gz: fbbb20768dad8d656c5d9d53132f6507a976d31f
5
5
  SHA512:
6
- metadata.gz: b350e72c6b4ab2ea3a634112ec02bbbf4f063301bc8e4ab10c0f7bbfeecf3f7a12f42722f5057c9b57c5e32b67ad1584674342448134b46be2b4e8f558f5a1e7
7
- data.tar.gz: ad7c94f6049fbce20494dc0be0c0fbaf0cdbbc5bd441dae460df912117e7753ebea44a65ef2dddb402009e82f14e22879fcf25809ce561a7efadea4de5563312
6
+ metadata.gz: c1e98356761f51eaef235c49efcab92333bb5e75683639ecc68e2a3658b0db4b8a314a4b48be5f66b9644af0f16e7eee4955c2f9f4780315ef8210e824393ba0
7
+ data.tar.gz: afad9d48c7aa908c641e052123e8ca265077aedeeb7d89ab56cc89331990cc20f9fc29dbc8711ec0e131cec7880634e48315183f9aeaabd2c533a1c568510613
data/CHANGELOG.md CHANGED
@@ -5,6 +5,8 @@ Contributors: please follow the recommendations outlined at [keepachangelog.com]
5
5
 
6
6
  ## [Unreleased]
7
7
  *Please add entries here for your pull requests.*
8
+ ## Changed
9
+ - Change webpack output path to absolute and update webpack to version ^2.3.1. [#771](https://github.com/shakacode/react_on_rails/pull/771) by [cheremukhin23](https://github.com/cheremukhin23).
8
10
 
9
11
  ## [6.8.1] - 2017-03-21
10
12
  ### Fixed
data/KUDOS.md CHANGED
@@ -2,6 +2,10 @@ This is a sibling file to [PROJECTS.md](./PROJECTS.md).
2
2
 
3
3
  I'm looking for quotes on why you like using React on Rails. You might mention any benefits you particularly like and if you've migrated from react-rails. Just click to edit and github will automatically open up a PR. Thanks to everybody that contributes!
4
4
 
5
+ ### March 23, 2017
6
+ Github issue [#766](https://github.com/shakacode/react_on_rails/issues/766).
7
+ ![2017-03-23_17-43-17](https://cloud.githubusercontent.com/assets/1118459/24279884/badab166-0ff0-11e7-87ab-94253f55a3d9.png)
8
+
5
9
  ### March 2, 2017
6
10
  ![2017-03-05_21-34-34](https://cloud.githubusercontent.com/assets/1118459/23600716/0d8c40d6-01ec-11e7-998d-4ce9e6abcacb.png)
7
11
 
data/PROJECTS.md CHANGED
@@ -1,9 +1,10 @@
1
- #Projects using React on Rails
1
+ # Projects using React on Rails
2
2
 
3
3
  *Please add your project to this list.*
4
4
 
5
5
  ## Commercial Products Live
6
6
  * **[Friends and Guests](https://www.friendsandguests.com/)**, the signature product of [ShakaCode](http://www.shakacode.com), which is a "Network Connecting Hosts and Guests".
7
+ * **[KissKissBankBank](https://www.kisskissbankbank.com/)**, large French crowdfunding platform.
7
8
  * **[Nootrobox](https://nootrobox.com)**: Web ecommerce site for "biohacking" products.
8
9
  * **[GuavaPass](https://guavapass.com/)**: Coaching client of [ShakaCode](http://www.shakacode.com) and React on Rails fan!
9
10
  * **[Pivotal Tracker](http://www.pivotaltracker.com/)**: The first (and most-loved) agile project management tool built on Rails. React on Rails has greatly simplified integration and workflow for our React components in Rails!
@@ -38,3 +39,4 @@
38
39
 
39
40
  * [github.com/Limenius/symfony-react-sandbox](https://github.com/Limenius/symfony-react-sandbox)
40
41
  * [github.com/tswayne/react-helper](https://github.com/tswayne/react-helper)
42
+ * [github.com/KissKissBankBank/kitten](https://github.com/KissKissBankBank/kitten)
@@ -1,10 +1,15 @@
1
1
  # Hot Reloading of Assets For Rails Development
2
2
 
3
- This document outlines the steps to setup your React On Rails Environment so that you can experience the pleasure of hot reloading of JavaScript and Sass during your Rails development work. There are 2 examples of this setup:
3
+ This document outlines the steps to setup your React On Rails Environment so that you can experience the pleasure of hot reloading of JavaScript and Sass during your Rails development work. See [Issue 332](https://github.com/shakacode/react_on_rails/issues/332) for troubleshooting. There are 3 examples of this setup:
4
4
 
5
+ 1. [minimal demo here](https://github.com/retroalgic/react-on-rails-hot-minimal): The most simple and updated hot reloading setup.
5
6
  1. [spec/dummy](https://github.com/shakacode/react_on_rails/tree/master/spec/dummy): Simpler setup used for integration testing this gem.
6
7
  1. [shakacode/react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial/). Full featured setup using Twitter bootstrap.
7
8
 
9
+ ## Help Wanted
10
+
11
+ This doc might be outdated. PRs welcome!
12
+
8
13
  ## High Level Strategy
9
14
 
10
15
  We'll use a Webpack Dev server on port 3500 to provide the assets to Rails, rather than the asset pipeline, and only during development mode. This is configured via the `Procfile.hot`.
@@ -0,0 +1,35 @@
1
+ # Images
2
+
3
+ A full example can be found at [spec/dummy/client/app/components/ImageExample/ImageExample.js](../../spec/dummy/client/app/components/ImageExample/ImageExample.js)
4
+
5
+ You are free to use images either in image tags or as background images in SCSS files. You can
6
+ use a "global" location of /client/app/assets/images or a relative path to your JS or SCSS file, as
7
+ is done with CSS modules.
8
+
9
+ **images** is a defined alias, so "images/foobar.jpg" would point to the file at
10
+ `/client/app/assets/images/foobar.jpg.`
11
+
12
+ # Usage as Background Images or for `img` Tags
13
+
14
+ Background images for CSS/SCSS need slightly different handling than images used with `img` tags,
15
+ and thus we need to configure the webpack loaders slightly differently.
16
+
17
+ The example shows you how to put either `bg-` or `bg_` in any file to be used as a background image. A regexp match
18
+ will ensure the appropriate version of the url-loader to be used depending on if the image is used
19
+ as a background image or within an `img` tag.
20
+
21
+ The reason why this is done is that the sass-loader assumes that images will be relative to the
22
+ deployed sass file, which will already be `/assets/some-file.css`. Thus, the sass-loader is already
23
+ going to prepend `/assets` to all images. The file-loader needs an option to specify that the
24
+ public path is `/assets` and that will get prepended to any image path. Consequently, if we didn't
25
+ distinguish background images from images for `img` tags, then the background image tags will get
26
+ an image path like `/assets/assets/some-file.svg` because the sass-loader thinks the path should be
27
+ `/assets/some-file.svg` and that gets added to what the file-loader will be doing.
28
+
29
+ We solve this by requiring a naming convention of `bg-` or `bg_` in the image names. Be warned that
30
+ the regexp does not check that these three characters are the beginning of a name or path. They can
31
+ be anywhere in the string. Of course, you can create your convention.
32
+
33
+ You can see this configured: [spec/dummy/client/webpack.common.js](../../spec/dummy/client/webpack.common.js)
34
+
35
+ _Note, all of this may change when we skip the asset pipeline for processing files in the near future._
@@ -4,7 +4,7 @@
4
4
  You can try out example app, [shakacode/react-webpack-rails-tutorial](https://github.com/shakacode/react-webpack-rails-tutorial). We're building comprehensive production examples in our new, premium product, [**React on Rails Pro**](https://forum.shakacode.com/t/introducing-react-on-rails-pro-subscriptions/785). If you're interested, please see the details in [this forum post](https://forum.shakacode.com/t/introducing-react-on-rails-pro-subscriptions/785).
5
5
 
6
6
  ## Webpack v1 or v2?
7
- We recommend using Webpack version 2.2.1 or greater.
7
+ We recommend using Webpack version 2.3.1 or greater.
8
8
 
9
9
  ## yarn or npm?
10
10
  Yarn is the current recommendation!
@@ -32,7 +32,7 @@
32
32
  "react-redux": "^5.0.3",
33
33
  "redux": "^3.6.0",
34
34
  <%- end -%>
35
- "webpack": "^2.2.1"
35
+ "webpack": "^2.3.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  }
@@ -3,6 +3,7 @@
3
3
  "only-multiline"} ] */
4
4
 
5
5
  const webpack = require('webpack');
6
+ const pathLib = require('path');
6
7
 
7
8
  const devBuild = process.env.NODE_ENV !== 'production';
8
9
 
@@ -16,7 +17,7 @@ const config = {
16
17
 
17
18
  output: {
18
19
  filename: 'webpack-bundle.js',
19
- path: '../app/assets/webpack',
20
+ path: pathLib.resolve(__dirname, '../app/assets/webpack'),
20
21
  },
21
22
 
22
23
  resolve: {
@@ -1,3 +1,3 @@
1
1
  module ReactOnRails
2
- VERSION = "6.8.1".freeze
2
+ VERSION = "6.8.2".freeze
3
3
  end
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-on-rails",
3
- "version": "6.8.1",
3
+ "version": "6.8.2",
4
4
  "description": "react-on-rails JavaScript for react_on_rails Ruby gem",
5
5
  "main": "node_package/lib/ReactOnRails.js",
6
6
  "directories": {
@@ -35,7 +35,7 @@
35
35
  "release-it": "^2.5.4",
36
36
  "tap-spec": "^4.1.1",
37
37
  "tape": "^4.6.3",
38
- "webpack": "^2.2.1"
38
+ "webpack": "^2.3.1"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "babel-runtime": ">= 6",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: react_on_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.8.1
4
+ version: 6.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Gordon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-21 00:00:00.000000000 Z
11
+ date: 2017-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool
@@ -326,6 +326,7 @@ files:
326
326
  - docs/additional-reading/foreman-issues.md
327
327
  - docs/additional-reading/heroku-deployment.md
328
328
  - docs/additional-reading/hot-reloading-rails-development.md
329
+ - docs/additional-reading/images.md
329
330
  - docs/additional-reading/node-dependencies-and-npm.md
330
331
  - docs/additional-reading/node-server-rendering.md
331
332
  - docs/additional-reading/rails-assets-relative-paths.md