Skip to content

Commit

Permalink
Add package.json to asset_dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
akshay-birajdar committed Aug 14, 2021
1 parent 7f662b0 commit 5110989
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion spec/support/outputs/rails_assets_precompile.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
if\ diff\ \-qrN\ ".*/deploy/current/vendor/assets/"\ "\./vendor/assets/"\ 2>/dev/null\ &&\ diff\ \-qrN\ ".*/deploy/current/app/assets/"\ "\./app/assets/"\ 2>/dev/null\ &&\ diff\ \-qrN\ ".*/deploy/current/app/javascript/"\ "\./app/javascript/"\ 2>/dev/null\s*then\s*echo\ "\-\-\-\-\->\ Skipping\ asset\ precompilation"\s*else\s*echo\ "\-\-\-\-\->\ Precompiling\ asset\ files"\s*RAILS_ENV="production"\ bundle\ exec\ rake\ assets:precompile\s*fi
if\ diff\ \-qrN\ ".*/deploy/current/vendor/assets/"\ "\./vendor/assets/"\ 2>/dev/null\ &&\ diff\ \-qrN\ ".*/deploy/current/app/assets/"\ "\./app/assets/"\ 2>/dev/null\ &&\ diff\ \-qrN\ ".*/deploy/current/app/javascript/"\ "\./app/javascript/"\ 2>/dev/null &&\ diff\ \-qrN\ ".*/deploy/current/package.json"\ "\./package.json"\ 2>/dev/null\s*then\s*echo\ "\-\-\-\-\->\ Skipping\ asset\ precompilation"\s*else\s*echo\ "\-\-\-\-\->\ Precompiling\ asset\ files"\s*RAILS_ENV="production"\ bundle\ exec\ rake\ assets:precompile\s*fi
4 changes: 2 additions & 2 deletions tasks/mina/rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
set :rake, -> { "#{fetch(:bundle_prefix)} rake" }
set :rails, -> { "#{fetch(:bundle_prefix)} rails" }
set :compiled_asset_path, ['public/assets', 'public/packs']
set :asset_dirs, ['vendor/assets/', 'app/assets/', 'app/javascript/']
set :asset_dirs, ['vendor/assets/', 'app/assets/', 'app/javascript/', 'package.json']
set :migration_dirs, ['db/migrate']

set :shared_dirs, fetch(:shared_dirs, []).push('log', 'tmp/cache', *fetch(:compiled_asset_path))
set :shared_dirs, fetch(:shared_dirs, []).push('log', 'tmp/cache', 'node_modules', *fetch(:compiled_asset_path))

desc 'Starts an interactive console.'
task :console do
Expand Down

0 comments on commit 5110989

Please sign in to comment.