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

Skip adding webpacker gem when generating dummyapp #3922

Merged

Conversation

SamuelMartini
Copy link
Contributor

Description

Currently, the dummy app generated to test extensions has the javascript_pack_tag helper included in layouts/application.html.erb. This is because skip-webpack-install only prevents rails to run the webpacker install task but being webpacker the default for Rails 6, it is still included in the generated view.

--skip-javascript avoids webpacker to be included in the rails generated app.1

Related pr #3326 where --skip-javascript is used in the sandbox generation.

Checklist:

@@ -44,6 +44,7 @@ def generate_test_dummy
opts[:skip_yarn] = true
opts[:skip_bootsnap] = true
opts[:skip_webpack_install] = true
opts[:skip_javascript] = true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is skip_webpack_install needed if we have skip_javascript?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually not! 👍
Pushing the skip_webpack_install removal.

Copy link
Contributor Author

@SamuelMartini SamuelMartini Feb 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

`skip-webpack-install` prevents rails to run the webpacker install task
but the webpacker helper (javascript_pack_tag) is still included in
`layouts/application.html.erb` as webpacker is the Rails 6 default.

`--skip-javascript` avoids webpacker to be included in the rails
generated app.[1]

[1]: rails/rails#35484 (comment)
@SamuelMartini SamuelMartini force-pushed the SamuelMartini/no_webpacker_dummy_generator branch from a06a461 to b97c136 Compare February 5, 2021 11:43
Copy link
Member

@kennyadsl kennyadsl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@spaghetticode spaghetticode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SamuelMartini thanks for the fix! 👍

@kennyadsl kennyadsl merged commit c69dddb into solidusio:master Feb 18, 2021
@kennyadsl kennyadsl deleted the SamuelMartini/no_webpacker_dummy_generator branch February 18, 2021 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants