Skip to content

Commit

Permalink
Add 'nodejs' buildback (Ref: rails/webpacker#739)
Browse files Browse the repository at this point in the history
  • Loading branch information
vishaltelangre committed Nov 30, 2017
1 parent c0698cc commit 193d55e
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 32 deletions.
5 changes: 3 additions & 2 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
rails: rails server -p 3333
webpack: ./bin/webpack-dev-server
release: bin/rails db:migrate
worker: ./bin/webpack-dev-server
web: bin/rails server -p $PORT -e $RAILS_ENV
2 changes: 2 additions & 0 deletions Procfile.dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rails: rails server -p 3333
webpack: ./bin/webpack-dev-server
6 changes: 3 additions & 3 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"name": "elmsanity",
"description": "",
"scripts": {
"postdeploy": "cp config/database.yml.postgresql config/database.yml; bundle exec rails db:create; bundle exec rails db:migrate; NODE_ENV=production bundle exec rails webpacker:compile"
},
},
"env": {
"SECRET_KEY_BASE": {
"generator": "secret"
Expand All @@ -19,6 +18,7 @@

],
"buildpacks": [

{ "url": "heroku/nodejs" },
{ "url": "heroku/ruby" }
]
}
22 changes: 0 additions & 22 deletions config/database.yml

This file was deleted.

14 changes: 12 additions & 2 deletions config/webpacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,15 @@ production:

staging:
<<: *default
compile: false
cache_manifest: true
compile: true
dev_server:
https: false
host: localhost
port: 3035
public: localhost:3035
hmr: false
# Inline should be set to true if using HMR
inline: true
overlay: true
disable_host_check: true
use_local_ip: false
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"@rails/webpacker": "^3.0.2",
"coffeescript": "1.12.7",
"elm": "^0.18.0",
"elm-webpack-loader": "^4.4.0"
"elm-webpack-loader": "^4.4.0",
"webpack-dev-server": "^2.9.4"
},
"devDependencies": {
"elm-hot-loader": "^0.5.4",
"webpack-dev-server": "^2.9.4"
"elm-hot-loader": "^0.5.4"
}
}

0 comments on commit 193d55e

Please sign in to comment.