Skip to content

Commit d494631

Browse files
Add 'nodejs' buildback (Ref: rails/webpacker#739)
1 parent c0698cc commit d494631

File tree

8 files changed

+36
-40
lines changed

8 files changed

+36
-40
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# Ignore the default SQLite database.
1111
/db/*.sqlite3
1212
/db/*.sqlite3-journal
13+
/config/database.yml
1314

1415
# Ignore all logfiles and tempfiles.
1516
/log/*

Procfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
rails: rails server -p 3333
2-
webpack: ./bin/webpack-dev-server
1+
release: bin/rails db:migrate
2+
web: bin/rails server -p $PORT -e $RAILS_ENV

Procfile.dev

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rails: rails server -p 3333
2+
webpack: ./bin/webpack-dev-server

app.json

+17-10
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
11
{
22
"name": "elmsanity",
33
"description": "",
4-
"scripts": {
5-
"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"
6-
},
4+
"scripts": {},
75
"env": {
86
"SECRET_KEY_BASE": {
97
"generator": "secret"
10-
},
11-
"RACK_ENV": "staging",
12-
"RAILS_ENV": "staging",
13-
"LOG_LEVEL": "DEBUG",
14-
"HEROKU": "true"
8+
}
159
},
1610
"formation": {
11+
"web": {
12+
"quantity": 1
13+
}
1714
},
1815
"addons": [
19-
16+
{
17+
"plan": "heroku-postgresql",
18+
"options": {
19+
"version": "9.5"
20+
}
21+
}
2022
],
2123
"buildpacks": [
22-
24+
{
25+
"url": "heroku/nodejs"
26+
},
27+
{
28+
"url": "heroku/ruby"
29+
}
2330
]
2431
}

config/database.yml

-22
This file was deleted.

config/webpacker.yml

+2
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,6 @@ production:
6666
staging:
6767
<<: *default
6868
compile: false
69+
70+
# Cache manifest.json for performance
6971
cache_manifest: true

lib/tasks/assets.rake

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
namespace :assets do
2+
desc "Compile assets"
3+
task precompile: [:environment] do
4+
Rake::Task["webpacker:compile"].invoke
5+
end
6+
end

yarn.lock

+6-6
Original file line numberDiff line numberDiff line change
@@ -1722,8 +1722,8 @@ error-ex@^1.2.0:
17221722
is-arrayish "^0.2.1"
17231723

17241724
es-abstract@^1.7.0:
1725-
version "1.9.0"
1726-
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.9.0.tgz#690829a07cae36b222e7fd9b75c0d0573eb25227"
1725+
version "1.10.0"
1726+
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.10.0.tgz#1ecb36c197842a00d8ee4c2dfd8646bb97d60864"
17271727
dependencies:
17281728
es-to-primitive "^1.1.1"
17291729
function-bind "^1.1.1"
@@ -1887,7 +1887,7 @@ expand-range@^1.8.1:
18871887
dependencies:
18881888
fill-range "^2.1.0"
18891889

1890-
express@^4.13.3:
1890+
express@^4.16.2:
18911891
version "4.16.2"
18921892
resolved "https://registry.yarnpkg.com/express/-/express-4.16.2.tgz#e35c6dfe2d64b7dca0a5cd4f21781be3299e076c"
18931893
dependencies:
@@ -5397,8 +5397,8 @@ webpack-dev-middleware@^1.11.0:
53975397
time-stamp "^2.0.0"
53985398

53995399
webpack-dev-server@^2.9.4:
5400-
version "2.9.4"
5401-
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.4.tgz#7883e61759c6a4b33e9b19ec4037bd4ab61428d1"
5400+
version "2.9.5"
5401+
resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-2.9.5.tgz#79336fba0087a66ae491f4869f6545775b18daa8"
54025402
dependencies:
54035403
ansi-html "0.0.7"
54045404
array-includes "^3.0.3"
@@ -5408,7 +5408,7 @@ webpack-dev-server@^2.9.4:
54085408
connect-history-api-fallback "^1.3.0"
54095409
debug "^3.1.0"
54105410
del "^3.0.0"
5411-
express "^4.13.3"
5411+
express "^4.16.2"
54125412
html-entities "^1.2.0"
54135413
http-proxy-middleware "~0.17.4"
54145414
import-local "^0.1.1"

0 commit comments

Comments
 (0)