Module: ReactEmailRails::Tasks
- Defined in:
- lib/react_email_rails/tasks.rb
Class Method Summary collapse
Class Method Details
.build ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/react_email_rails/tasks.rb', line 5 def build command = build_command raise("react-email-rails build command not found at #{command.inspect}; run JavaScript package install first") unless File.exist?(command) system(command, exception: true, chdir: Rails.root.to_s) raise("react-email-rails build completed, but the email bundle was not found at #{bundle_path.inspect}") unless File.file?(bundle_path) end |
.clobber ⇒ Object
13 14 15 |
# File 'lib/react_email_rails/tasks.rb', line 13 def clobber FileUtils.rm_rf(Rails.root.join(File.dirname(ReactEmailRails::Configuration::BUNDLE_PATH))) end |