Class: Joosy::Generators::ApplicationGenerator

Inherits:
Rails::Generators::JoosyBase show all
Defined in:
lib/rails/generators/joosy/application_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_filesObject



8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rails/generators/joosy/application_generator.rb', line 8

def create_files
  super

  template "app.js.coffee", "#{file_path}.js.coffee"

  template "app_railties.js.coffee.erb", "#{file_path}_railties.js.coffee.erb"

  empty_directory file_path

  template "app/routes.js.coffee", "#{file_path}/routes.js.coffee"

  empty_directory "#{file_path}/helpers"
  template "app/helpers/application.js.coffee", "#{file_path}/helpers/application.js.coffee"

  empty_directory "#{file_path}/layouts"
  template "app/layouts/application.js.coffee", "#{file_path}/layouts/application.js.coffee"

  empty_directory "#{file_path}/pages/welcome"
  template "app/pages/application.js.coffee", "#{file_path}/pages/application.js.coffee"
  template "app/pages/welcome/index.js.coffee", "#{file_path}/pages/welcome/index.js.coffee"

  empty_directory "#{file_path}/templates/layouts"
  template "app/templates/layouts/application.jst.hamlc", "#{file_path}/templates/layouts/application.jst.hamlc"

  empty_directory "#{file_path}/templates/pages/welcome"
  template "app/templates/pages/welcome/index.jst.hamlc", "#{file_path}/templates/pages/welcome/index.jst.hamlc"

  empty_directory_with_gitkeep "#{file_path}/widgets"
  empty_directory_with_gitkeep "#{file_path}/resources"

  empty_directory_with_gitkeep "#{file_path}/templates/layouts"
  empty_directory_with_gitkeep "#{file_path}/templates/widgets"
end