From 2e64fb516964d4b473d91b76186e111e84ea7458 Mon Sep 17 00:00:00 2001 From: Bradley Wittenbrook Date: Mon, 25 Jul 2016 23:50:54 -0400 Subject: [PATCH] Add ember-cli-rails to heroku buildpack --- Gemfile | 2 ++ Gemfile.lock | 6 ++++++ bin/heroku_install | 12 ++++++++++++ package.json | 13 +++++++++++++ 4 files changed, 33 insertions(+) create mode 100755 bin/heroku_install create mode 100644 package.json diff --git a/Gemfile b/Gemfile index 2400fd8..ed2dad4 100644 --- a/Gemfile +++ b/Gemfile @@ -49,3 +49,5 @@ end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] + +gem 'rails_12factor', group: [:staging, :production] \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 57061e5..93d1074 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -122,6 +122,11 @@ GEM nokogiri (~> 1.6.0) rails-html-sanitizer (1.0.3) loofah (~> 2.0) + rails_12factor (0.0.3) + rails_serve_static_assets + rails_stdout_logging + rails_serve_static_assets (0.0.5) + rails_stdout_logging (0.0.5) railties (5.0.0) actionpack (= 5.0.0) activesupport (= 5.0.0) @@ -182,6 +187,7 @@ DEPENDENCIES pg (~> 0.18) puma (~> 3.0) rails (~> 5.0.0) + rails_12factor sass-rails (~> 5.0) spring spring-watcher-listen (~> 2.0.0) diff --git a/bin/heroku_install b/bin/heroku_install new file mode 100755 index 0000000..e417bc3 --- /dev/null +++ b/bin/heroku_install @@ -0,0 +1,12 @@ +#!/usr/bin/env sh + +set -e + +bower="$(pwd)/node_modules/.bin/bower" + +for app in "frontend"; do + cd $app && + npm install && + $bower install && + cd - +done diff --git a/package.json b/package.json new file mode 100644 index 0000000..78f3b8b --- /dev/null +++ b/package.json @@ -0,0 +1,13 @@ +{ + "scripts": { + "postinstall": "./bin/heroku_install" + }, + "devDependencies": { + "bower": "*" + }, + "cacheDirectories": [ + "frontend/node_modules", + "frontend/bower_components", + "node_modules" + ] +}