Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new config option rails_webpacker_use_webpacker4 #82

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions rails/create-release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,16 @@ Those file will be placed relativ to the shared folders and symlinked into the r

Just set this variable in your provisioning/deployment:

```
```yaml
rails_webpacker: yes

# if you are using Webpacker 4+, change that to:
rails_webpacker: 4
```

This will:

1. (this role) Export these files from git in addition to the defaults: yarn.lock package.json .babelrc .postcssrc.yml
1. (this role) Export these files from git in addition to the defaults: yarn.lock package.json .babelrc .postcssrc.yml (babel.config.js and postcss.config.js if using Webpacker 4)
2. (this role) Keep/Symlink public/packs and node_modules between deployments
3. (asset precompilation) ``rake yarn:install`` is run by ``rails assets:precompile`` (from +5.1), if a bin/yarn binstub is provided. **NOTE** without that binstub no node_modules are installed! Make sure to add it with ``rails app:update:bin`` and commit to your app repo.

Expand Down
8 changes: 6 additions & 2 deletions rails/create-release/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,15 @@ rails_deploy_custom_create_folders: [] # custom folders that are created for eac

# Webpacker / yarn default settings
rails_webpacker: no

rails_deploy_webpacker_archive:
- yarn.lock
- package.json
- .babelrc
- .postcssrc.yml
- "{% if rails_webpacker_use_webpacker == 4 %}babel.config.js{% else %}.babelrc{% endif %}"
- "{% if rails_webpacker_use_webpacker == 4 %}postcss.config.js{% else %}.postcssrc.yml{% endif %}"




rails_deploy_webpacker_pack_dir: public/packs
rails_deploy_custom_shared_webpacker_folders: ['{{rails_deploy_webpacker_pack_dir}}', 'node_modules']
Expand Down