class CljsRails::InstallGenerator

Public Instance Methods

add_foreman_to_gemfile() click to toggle source
# File lib/generators/cljs_rails/install_generator.rb, line 14
def add_foreman_to_gemfile
  gem 'foreman'
end
add_to_gitignore() click to toggle source
# File lib/generators/cljs_rails/install_generator.rb, line 39
    def add_to_gitignore
      append_to_file ".gitignore" do
        <<-EOF.strip_heredoc
        # Added by cljs-rails
        /app/assets/cljs-build
        .nrepl-port
        EOF
      end
    end
copy_boot_properties() click to toggle source
# File lib/generators/cljs_rails/install_generator.rb, line 26
def copy_boot_properties
  copy_file "boot.properties", "boot.properties"
end
copy_build_boot() click to toggle source
# File lib/generators/cljs_rails/install_generator.rb, line 22
def copy_build_boot
  template("build.boot", "build.boot")
end
copy_procfile() click to toggle source
# File lib/generators/cljs_rails/install_generator.rb, line 18
def copy_procfile
  copy_file "Procfile", "Procfile"
end
create_core_cljs() click to toggle source
# File lib/generators/cljs_rails/install_generator.rb, line 30
def create_core_cljs
  empty_directory "cljs/src/#{app_name}"
  template("core.cljs", "cljs/src/#{app_name}/core.cljs")
end
create_main_edn() click to toggle source
# File lib/generators/cljs_rails/install_generator.rb, line 35
def create_main_edn
  template("main.cljs.edn", "cljs/src/main.cljs.edn")
end
whats_next() click to toggle source
# File lib/generators/cljs_rails/install_generator.rb, line 49
    def whats_next
      puts <<-EOF.strip_heredoc

        We've set up the basics of clojurescript-rails for you, but you'll still
        need to:

          1. Add the 'main' entry point into your layout, and
          2. Run 'foreman start' to run the boot build and rails server

        See the README.md for this gem at
        https://github.com/bogdan-dumitru/cljs-rails/blob/master/README.md
        for more info.

        Have a functional day!
      EOF
    end