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

Allow for overriding build_command #203

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zachahn
Copy link

@zachahn zachahn commented Sep 22, 2024

Hello!

I'd like to rename my yarn build to yarn build:js because the build script is used by my deployment system. This PR makes this possible. I tried to keep the code change pretty small, but I moved the Tasks module into its own file so that I could write tests for it.

I considered allowing the install command to also be overridden, but I didn't think that would be too useful since it should only really get run once per application.

If this gets merged, I'm planning on updating my app's Rakefile to the following:

require_relative "config/application"

Rails.application.load_tasks

Jsbundling::Tasks.build_command = "yarn build:js"

@zachahn
Copy link
Author

zachahn commented Sep 22, 2024

Tests are failing, but they seem unrelated to my change and only affect Rails main

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.

1 participant