jsbundling-rails
jsbundling-rails copied to clipboard
Allow for overriding `build_command`
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"