class Alchemy::Upgrader::SevenPointZero

Public Class Methods

remove_admin_entrypoint() click to toggle source
# File lib/alchemy/upgrader/seven_point_zero.rb, line 11
def remove_admin_entrypoint
  FileUtils.rm_rf "app/assets/builds/alchemy_admin.*"
  FileUtils.rm_rf "app/javascript/packs/alchemy/admin.js"
  FileUtils.rm_rf "app/javascript/packs/alchemy_admin.js"
  FileUtils.rm_rf "app/javascript/packs/alchemy"
  FileUtils.rm_rf "app/javascript/packs/alchemy"
  task.run "yarn remove @alchemy_cms/admin"
  if task.ask("Do you want to remove webpacker as well? (y/N)", default: "N") == "y"
    task.run "bundle remove webpacker"
    task.run "yarn remove @rails/webpacker webpack webpack-cli webpack-dev-server"
    FileUtils.rm_rf "app/javascript/packs"
    FileUtils.rm_rf "config/webpack"
    FileUtils.rm_f "config/webpacker.yml"
    FileUtils.rm_f "bin/webpack"
    FileUtils.rm_f "bin/webpack-dev-server"
  end
end

Private Class Methods

task() click to toggle source
# File lib/alchemy/upgrader/seven_point_zero.rb, line 31
def task
  @_task || new
end