Class: CljsRails::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- CljsRails::InstallGenerator
- Defined in:
- lib/generators/cljs_rails/install_generator.rb
Overview
:nodoc:
Instance Method Summary collapse
- #add_foreman_to_gemfile ⇒ Object
- #add_to_gitignore ⇒ Object
- #copy_boot_properties ⇒ Object
- #copy_build_boot ⇒ Object
- #copy_procfile ⇒ Object
- #create_core_cljs ⇒ Object
- #create_main_edn ⇒ Object
- #whats_next ⇒ Object
Instance Method Details
#add_foreman_to_gemfile ⇒ Object
14 15 16 |
# File 'lib/generators/cljs_rails/install_generator.rb', line 14 def add_foreman_to_gemfile gem 'foreman' end |
#add_to_gitignore ⇒ Object
39 40 41 42 43 44 45 46 47 |
# 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 ⇒ Object
26 27 28 |
# File 'lib/generators/cljs_rails/install_generator.rb', line 26 def copy_boot_properties copy_file "boot.properties", "boot.properties" end |
#copy_build_boot ⇒ Object
22 23 24 |
# File 'lib/generators/cljs_rails/install_generator.rb', line 22 def copy_build_boot template("build.boot", "build.boot") end |
#copy_procfile ⇒ Object
18 19 20 |
# File 'lib/generators/cljs_rails/install_generator.rb', line 18 def copy_procfile copy_file "Procfile", "Procfile" end |
#create_core_cljs ⇒ Object
30 31 32 33 |
# 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 ⇒ Object
35 36 37 |
# 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 ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
# 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 |