Class: Alchemy::Upgrader::SevenPointZero

Inherits:
Alchemy::Upgrader show all
Includes:
Thor::Actions, Thor::Base
Defined in:
lib/alchemy/upgrader/seven_point_zero.rb

Constant Summary

Constants included from Shell

Shell::COLORS

Class Method Summary collapse

Methods inherited from Alchemy::Upgrader

copy_new_config_file

Methods included from Shell

#add_todo, #desc, #display_todos, #log, silence!, silenced?, #todo, #todos, verbose!

Class Method Details

.remove_admin_entrypointObject



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 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