Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Commit

Permalink
feat(setup): support for webpacker
Browse files Browse the repository at this point in the history
  • Loading branch information
kpheasey authored and ajgon committed Jul 9, 2019
1 parent c0b0e84 commit 569b9bb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
11 changes: 8 additions & 3 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
nginx::http_stub_status_module
]

default['nodejs']['version'] = '8.11.1'

default['deploy']['timeout'] = 600

# global
Expand All @@ -23,11 +25,14 @@
'assets' => 'public/assets',
'cache' => 'tmp/cache',
'pids' => 'tmp/pids',
'log' => 'log'
'log' => 'log',
'node_modules' => 'node_modules',
'packs' => 'public/packs'
}
default['defaults']['global']['create_dirs_before_symlink'] =
%w[tmp public config ../../shared/cache ../../shared/assets]
default['defaults']['global']['purge_before_symlink'] = %w[log tmp/cache tmp/pids public/system public/assets]
%w[tmp public config ../../shared/cache ../../shared/assets ../../shared/node_modules ../../shared/packs]
default['defaults']['global']['purge_before_symlink'] =
%w[log tmp/cache tmp/pids public/system public/assets node_modules public/packs]
default['defaults']['global']['rollback_on_error'] = true
default['defaults']['global']['logrotate_rotate'] = 30
default['defaults']['global']['logrotate_frequency'] = 'daily'
Expand Down
2 changes: 2 additions & 0 deletions metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
depends 'ruby-ng'
depends 's3_file'
depends 'sudo'
depends 'nodejs'
depends 'yarn'

# indirect dependency, but breaks against the chef_version if updated to 3.1.0
depends 'seven_zip', '~> 2.0'
Expand Down
4 changes: 4 additions & 0 deletions recipes/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
end
end

# NodeJS and Yarn
include_recipe 'nodejs'
include_recipe 'yarn'

# Ruby and bundler
if node['platform_family'] == 'debian'
node.default['ruby-ng']['ruby_version'] = node['ruby-version']
Expand Down

0 comments on commit 569b9bb

Please sign in to comment.