react_on_rails 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/docs/linters.md +18 -1
- data/lib/generators/react_on_rails/install_generator.rb +4 -4
- data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb +1 -1
- data/lib/generators/react_on_rails/templates/linters/client/.eslintrc +1 -1
- data/lib/generators/react_on_rails/templates/no_redux/base/client/package.json.tt +4 -4
- data/lib/generators/react_on_rails/templates/redux/base/client/package.json.tt +4 -4
- data/lib/react_on_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3cafbd0b068b4be809103e6f043761aa5ca9dff1
|
4
|
+
data.tar.gz: 4466dd647b9846dc792d8e3926a6819caf40f989
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 827b09823116f3d03ddf43d2343f2cfa45aa18793011d4174ec3517c4777c49a331c35b4f4d6533e8b73040d9a18befa3f452a33e973925c08d3abf3e6c9b568
|
7
|
+
data.tar.gz: d529ec20ac5c921231b64b0fe06201a78ff7671c2c27197ee3b93f735b5cccf810262550027f760135d776d0c4d8ba04066ca6a382a949ea5b1eeb61fd447e9e
|
data/README.md
CHANGED
@@ -54,7 +54,7 @@ In the following screenshot you can see the actual HTML rendered for a side-by-s
|
|
54
54
|
rails generate react_on_rails:install
|
55
55
|
```
|
56
56
|
|
57
|
-
3. NPM install
|
57
|
+
3. NPM install. Make sure you are on a recent version of node, preferably using nvm.
|
58
58
|
|
59
59
|
```bash
|
60
60
|
npm install
|
data/docs/linters.md
CHANGED
@@ -1,8 +1,25 @@
|
|
1
1
|
# Linters
|
2
|
-
The React on Rails generator
|
2
|
+
The React on Rails generator can add linters and their recommended accompanying configurations to your project (to disable this behavior, include the `--linters` option when running the generator). Those linters that are written in Ruby have been added to your Gemfile, and those that run in Node have been add to your `package.json` under `devDependencies`.
|
3
3
|
|
4
4
|
To run the linters (runs both Ruby and Node linters):
|
5
5
|
|
6
6
|
```bash
|
7
7
|
rake lint
|
8
8
|
```
|
9
|
+
|
10
|
+
Run this command to see all the linters available
|
11
|
+
|
12
|
+
```bash
|
13
|
+
rake -T lint
|
14
|
+
```
|
15
|
+
|
16
|
+
**Here's the list:**
|
17
|
+
```bash
|
18
|
+
rake lint # Runs all linters
|
19
|
+
rake lint:eslint # eslint
|
20
|
+
rake lint:js # JS Linting
|
21
|
+
rake lint:jscs # jscs
|
22
|
+
rake lint:rubocop[fix] # Run Rubocop lint in shell
|
23
|
+
rake lint:ruby # Run ruby-lint as shell
|
24
|
+
rake lint:scss # See docs for task 'scss_lint'
|
25
|
+
```
|
@@ -28,11 +28,11 @@ module ReactOnRails
|
|
28
28
|
default: false,
|
29
29
|
desc: "Configure for server-side rendering of webpack JavaScript",
|
30
30
|
aliases: "-S"
|
31
|
-
# --
|
32
|
-
class_option :
|
31
|
+
# --linters
|
32
|
+
class_option :linters,
|
33
33
|
type: :boolean,
|
34
34
|
default: false,
|
35
|
-
desc: "
|
35
|
+
desc: "Install linter files",
|
36
36
|
aliases: "-L"
|
37
37
|
|
38
38
|
def run_generators
|
@@ -41,7 +41,7 @@ module ReactOnRails
|
|
41
41
|
invoke "react_on_rails:base"
|
42
42
|
invoke "react_on_rails:react_no_redux" unless options.redux?
|
43
43
|
invoke "react_on_rails:react_with_redux" if options.redux?
|
44
|
-
invoke "react_on_rails:linters"
|
44
|
+
invoke "react_on_rails:linters" if options.linters?
|
45
45
|
invoke "react_on_rails:bootstrap"
|
46
46
|
invoke "react_on_rails:heroku_deployment"
|
47
47
|
end
|
data/lib/generators/react_on_rails/templates/base/base/config/initializers/react_on_rails.rb
CHANGED
@@ -12,7 +12,7 @@ ReactOnRails.configure do |config|
|
|
12
12
|
# seconds
|
13
13
|
config.server_renderer_timeout = 20
|
14
14
|
# If set to true, this forces Rails to reload the server bundle if it is modified
|
15
|
-
config.
|
15
|
+
config.development_mode = Rails.env.development?
|
16
16
|
# For server rendering. This can be set to false so that server side messages are discarded.
|
17
17
|
# Default is true. Be cautious about turning this off.
|
18
18
|
config.replay_console = true
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"build:client": "NODE_ENV=production webpack --config webpack.client.rails.config.js",
|
30
30
|
"build:server": "NODE_ENV=production webpack --config webpack.server.rails.config.js",
|
31
31
|
"build:dev:client": "webpack -w --config webpack.client.rails.config.js",
|
32
|
-
"build:dev:server": "webpack -w --config webpack.server.rails.config.js",<%-
|
32
|
+
"build:dev:server": "webpack -w --config webpack.server.rails.config.js",<%- if options.linters? %>
|
33
33
|
"lint": "npm run eslint && npm run jscs",
|
34
34
|
"eslint": "eslint --ext .js,.jsx .",
|
35
35
|
"jscs": "jscs --verbose ."<%- end %>
|
@@ -51,19 +51,19 @@
|
|
51
51
|
"sleep": "^3.0.0",
|
52
52
|
"webpack": "^1.12.2"
|
53
53
|
},
|
54
|
-
"devDependencies": {<%-
|
54
|
+
"devDependencies": {<%- if options.linters? %>
|
55
55
|
"babel-eslint": "^4.1.3",
|
56
56
|
<%- end %>"babel-plugin-react-transform": "^1.1.1",
|
57
57
|
"bootstrap-sass": "^3.3.5",
|
58
58
|
"bootstrap-sass-loader": "^1.0.9",
|
59
|
-
"css-loader": "^0.19.0",<%-
|
59
|
+
"css-loader": "^0.19.0",<%- if options.linters? %>
|
60
60
|
"eslint": "^1.6.0",
|
61
61
|
"eslint-config-airbnb": "0.1.0",
|
62
62
|
"eslint-plugin-react": "^3.5.1",<%- end %>
|
63
63
|
"esprima-fb": "^15001.1001.0-dev-harmony-fb",
|
64
64
|
"express": "^4.13.3",
|
65
65
|
"file-loader": "^0.8.4",
|
66
|
-
"jade": "^1.11.0",<%-
|
66
|
+
"jade": "^1.11.0",<%- if options.linters? %>
|
67
67
|
"jscs": "^2.3.0",
|
68
68
|
<%- end %>"node-sass": "^3.3.3",
|
69
69
|
"react-transform-hmr": "^1.0.1",
|
@@ -29,7 +29,7 @@
|
|
29
29
|
"build:client": "NODE_ENV=production webpack --config webpack.client.rails.config.js",
|
30
30
|
"build:server": "NODE_ENV=production webpack --config webpack.server.rails.config.js",
|
31
31
|
"build:dev:client": "webpack -w --config webpack.client.rails.config.js",
|
32
|
-
"build:dev:server": "webpack -w --config webpack.server.rails.config.js",<%-
|
32
|
+
"build:dev:server": "webpack -w --config webpack.server.rails.config.js",<%- if options.linters? %>
|
33
33
|
"lint": "npm run eslint && npm run jscs",
|
34
34
|
"eslint": "eslint --ext .js,.jsx .",
|
35
35
|
"jscs": "jscs --verbose ."<%- end %>
|
@@ -58,19 +58,19 @@
|
|
58
58
|
"sleep": "^3.0.0",
|
59
59
|
"webpack": "^1.12.2"
|
60
60
|
},
|
61
|
-
"devDependencies": {<%-
|
61
|
+
"devDependencies": {<%- if options.linters? %>
|
62
62
|
"babel-eslint": "^4.1.3",<%- end %>
|
63
63
|
"babel-plugin-react-transform": "^1.1.1",
|
64
64
|
"bootstrap-sass": "^3.3.5",
|
65
65
|
"bootstrap-sass-loader": "^1.0.9",
|
66
|
-
"css-loader": "^0.19.0",<%-
|
66
|
+
"css-loader": "^0.19.0",<%- if options.linters? %>
|
67
67
|
"eslint": "^1.6.0",
|
68
68
|
"eslint-config-airbnb": "0.1.0",
|
69
69
|
"eslint-plugin-react": "^3.5.1",<%- end %>
|
70
70
|
"esprima-fb": "^15001.1001.0-dev-harmony-fb",
|
71
71
|
"express": "^4.13.3",
|
72
72
|
"file-loader": "^0.8.4",
|
73
|
-
"jade": "^1.11.0",<%-
|
73
|
+
"jade": "^1.11.0",<%- if options.linters? %>
|
74
74
|
"jscs": "^2.3.0",<%- end %>
|
75
75
|
"node-sass": "^3.3.3",
|
76
76
|
"react-transform-hmr": "^1.0.1",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: react_on_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Gordon
|
@@ -242,7 +242,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
242
242
|
version: '0'
|
243
243
|
requirements: []
|
244
244
|
rubyforge_project:
|
245
|
-
rubygems_version: 2.4.
|
245
|
+
rubygems_version: 2.4.5
|
246
246
|
signing_key:
|
247
247
|
specification_version: 4
|
248
248
|
summary: Rails with react server rendering with webpack.
|