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 def9be8
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
/config/database.yml

# Ignore all logfiles and tempfiles.
/log/*
Expand Down
File renamed without changes.
27 changes: 17 additions & 10 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
{
"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"
},
"scripts": {},
"env": {
"SECRET_KEY_BASE": {
"generator": "secret"
},
"RACK_ENV": "staging",
"RAILS_ENV": "staging",
"LOG_LEVEL": "DEBUG",
"HEROKU": "true"
}
},
"formation": {
"web": {
"quantity": 1
}
},
"addons": [

{
"plan": "heroku-postgresql",
"options": {
"version": "9.5"
}
}
],
"buildpacks": [

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

This file was deleted.

2 changes: 2 additions & 0 deletions config/webpacker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,6 @@ production:
staging:
<<: *default
compile: false

# Cache manifest.json for performance
cache_manifest: true
6 changes: 6 additions & 0 deletions lib/tasks/assets.rake
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace :assets do
desc "Compile assets"
task precompile: [:environment] do
Rake::Task["webpacker:compile"].invoke
end
end
12 changes: 6 additions & 6 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1722,8 +1722,8 @@ error-ex@^1.2.0:
is-arrayish "^0.2.1"

es-abstract@^1.7.0:
version "1.9.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.9.0.tgz#690829a07cae36b222e7fd9b75c0d0573eb25227"
version "1.10.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864"
dependencies:
es-to-primitive "^1.1.1"
function-bind "^1.1.1"
Expand Down Expand Up @@ -1887,7 +1887,7 @@ expand-range@^1.8.1:
dependencies:
fill-range "^2.1.0"

express@^4.13.3:
express@^4.16.2:
version "4.16.2"
resolved "https://registry.yarnpkg.com/express/-/express-4.16.2.tgz#e35c6dfe2d64b7dca0a5cd4f21781be3299e076c"
dependencies:
Expand Down Expand Up @@ -5397,8 +5397,8 @@ webpack-dev-middleware@^1.11.0:
time-stamp "^2.0.0"

webpack-dev-server@^2.9.4:
version "2.9.4"
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.4.tgz#7883e61759c6a4b33e9b19ec4037bd4ab61428d1"
version "2.9.5"
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.5.tgz#79336fba0087a66ae491f4869f6545775b18daa8"
dependencies:
ansi-html "0.0.7"
array-includes "^3.0.3"
Expand All @@ -5408,7 +5408,7 @@ webpack-dev-server@^2.9.4:
connect-history-api-fallback "^1.3.0"
debug "^3.1.0"
del "^3.0.0"
express "^4.13.3"
express "^4.16.2"
html-entities "^1.2.0"
http-proxy-middleware "~0.17.4"
import-local "^0.1.1"
Expand Down

0 comments on commit def9be8

Please sign in to comment.