Skip to content

Commit a98f761

Browse files
committedNov 27, 2014
Add foreman gem; Update Procfile.dev and README
1 parent 53bf847 commit a98f761

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed
 

‎Gemfile

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ group :development, :test do
4949

5050
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
5151
gem 'spring'
52+
53+
# Manage application processes
54+
gem 'foreman'
5255
end
5356

5457
gem 'autoprefixer-rails'

‎Gemfile.lock

+5
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,12 @@ GEM
5353
columnize (0.8.9)
5454
debug_inspector (0.0.2)
5555
debugger-linecache (1.2.0)
56+
dotenv (1.0.2)
5657
erubis (2.7.0)
5758
execjs (2.2.1)
59+
foreman (0.76.0)
60+
dotenv (~> 1.0.2)
61+
thor (~> 0.19.1)
5862
globalid (0.2.3)
5963
activesupport (>= 4.1.0)
6064
hike (1.2.3)
@@ -161,6 +165,7 @@ DEPENDENCIES
161165
autoprefixer-rails
162166
byebug
163167
coffee-rails (~> 4.0.0)
168+
foreman
164169
jbuilder (~> 2.0)
165170
jquery-rails
166171
pg

‎Procfile.dev

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
web: rails s -p 4000
2-
webpack: cd webpack && webpack -w --config webpack.rails.config.js
2+
webpack: cd webpack && $(npm bin)/webpack -w --config webpack.rails.config.js

‎README.md

+10
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,10 @@ Point browser to [http://0.0.0.0:3000]().
3838
Make sure to invoke your local copy of the webpack executable as opposed
3939
to any globally installed webpack.
4040
See https://github.com/webpack/extract-text-webpack-plugin/blob/master/example/webpack.config.js
41+
In doubt you can run the following command:
42+
```
43+
$(npm bin)/webpack --config webpack.hot.config.js
44+
```
4145

4246
Save a change to a JSX file and see it update immediately in the browser! Note,
4347
any browser state still exists, such as what you've typed in the comments box.
@@ -93,6 +97,12 @@ by the Rails asset pipeline.
9397
{ test: /\.scss$/, loader: "style!css!sass?outputStyle=expanded&imagePath=/assets/images"}
9498
```
9599

100+
# Process management
101+
Run the following command in your development environment to invoke both Webpack and Rails.
102+
```
103+
bundle exec foreman start -f Procfile.dev
104+
```
105+
96106
# Source Maps
97107
They work for both Rails and the Webpack Server!
98108

0 commit comments

Comments
 (0)