react-webpack-rails 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -4
- data/lib/generators/react/webpack/install_generator.rb +2 -2
- data/lib/react/webpack/rails/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3bd6bf3ad25ed961f78fab00fb34a3aacb20fd29
|
4
|
+
data.tar.gz: 43b912135ce1f9723ba372e2c8de6f172d855a23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e48c5425ec1bf0145e9cbd9af1a726fe4822794b8f9b9c98051ea6a422d0c36d722efcaec2b6a900a554bbb94611aee4ae0987c94dd7e8a4ed1e7435a70260d8
|
7
|
+
data.tar.gz: 974e365bf9b6825d0262a354febc91cff2f887614c19f1ff0af4b0e68205d0754dfeb5ae6c5590ff61634e16447d9d6543d2b2571067e897a12c22ba4e36ea85
|
data/README.md
CHANGED
@@ -69,7 +69,13 @@ _* you can skip immediate installation_
|
|
69
69
|
|
70
70
|
_* you can skip immediate installation_
|
71
71
|
|
72
|
+
**APPENDING WEBPACK WATCH TASK**
|
73
|
+
* `"watch": "webpack --watch --colors --progress"`
|
74
|
+
|
72
75
|
**APPENDING ASSETS INTO THE PIPELINE**
|
76
|
+
* `javascript_include_tag` to `app/views/layouts/application.html.erb`
|
77
|
+
* `Rails.application.config.assets.precompile += %w( bundle.js )` to `config/initializers/assets.rb`
|
78
|
+
|
73
79
|
|
74
80
|
## DEVELOPMENT
|
75
81
|
The generator installs Foreman and adds a Procfile to fire up Webpack and the Rails server in a single command:
|
@@ -94,11 +100,10 @@ You can call components in the view with an `erb` tag for your components and pr
|
|
94
100
|
## PRODUCTION
|
95
101
|
A rake task for precompiling the webpack assets is added by the generator. This essentially adds the Webpack/Babel transpiling to the precompilation task that runs when you deploy to production. So you should never need to have two separate build tasks.
|
96
102
|
|
97
|
-
##
|
98
|
-
|
99
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/react-webpack-rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
103
|
+
## CONTRIBUTING
|
100
104
|
|
105
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/alanbsmith/react-webpack-rails. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
101
106
|
|
102
|
-
##
|
107
|
+
## LICENSE
|
103
108
|
|
104
109
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
@@ -26,7 +26,7 @@ module React
|
|
26
26
|
def install_foreman
|
27
27
|
puts "Adding foreman gem"
|
28
28
|
gem "foreman"
|
29
|
-
if yes?("Run bundle install?")
|
29
|
+
if yes?("Run bundle install? ( y | n )")
|
30
30
|
system("bundle install")
|
31
31
|
else
|
32
32
|
puts "Cool. Just remember to run 'bundle install' later."
|
@@ -58,7 +58,7 @@ module React
|
|
58
58
|
def initialize_npm_and_node_modules
|
59
59
|
puts "Initalizing package.json"
|
60
60
|
system("npm init -y")
|
61
|
-
if yes?("Install node modules?")
|
61
|
+
if yes?("Install node modules? ( y | n )")
|
62
62
|
puts "Installing..."
|
63
63
|
system("npm install --save babel-core babel-loader babel-preset-es2015 babel-preset-react classnames react react-dom webpack")
|
64
64
|
append_npm_run_tasks
|