Class: PagesCore::Generators::FrontendGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/rails/generators/pages_core/frontend/frontend_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_application_jsObject


53
54
55
56
57
58
# File 'lib/rails/generators/pages_core/frontend/frontend_generator.rb', line 53

def create_application_js
  template(
    "application.js.erb",
    File.join("app/assets/javascripts/application.js")
  )
end

#create_application_scssObject


14
15
16
17
18
19
# File 'lib/rails/generators/pages_core/frontend/frontend_generator.rb', line 14

def create_application_scss
  template(
    "application.scss.erb",
    File.join("app/assets/stylesheets/application.scss")
  )
end

#create_base_cssObject


46
47
48
49
50
51
# File 'lib/rails/generators/pages_core/frontend/frontend_generator.rb', line 46

def create_base_css
  template(
    "base.scss.erb",
    File.join("app/assets/stylesheets/components/base.scss")
  )
end

#create_breakpoints_cssObject


32
33
34
35
36
37
# File 'lib/rails/generators/pages_core/frontend/frontend_generator.rb', line 32

def create_breakpoints_css
  template(
    "breakpoints.scss.erb",
    File.join("app/assets/stylesheets/mixins/breakpoints.scss")
  )
end

#create_clearfix_cssObject


39
40
41
42
43
44
# File 'lib/rails/generators/pages_core/frontend/frontend_generator.rb', line 39

def create_clearfix_css
  template(
    "clearfix.scss.erb",
    File.join("app/assets/stylesheets/mixins/clearfix.scss")
  )
end

#create_layoutObject


7
8
9
10
11
12
# File 'lib/rails/generators/pages_core/frontend/frontend_generator.rb', line 7

def create_layout
  copy_file(
    "layout.html.erb",
    File.join("app/views/layouts/application.html.erb")
  )
end

#create_normalize_cssObject


25
26
27
28
29
30
# File 'lib/rails/generators/pages_core/frontend/frontend_generator.rb', line 25

def create_normalize_css
  template(
    "normalize.css.erb",
    File.join("vendor/assets/stylesheets/normalize.css")
  )
end

#remove_application_cssObject


21
22
23
# File 'lib/rails/generators/pages_core/frontend/frontend_generator.rb', line 21

def remove_application_css
  remove_file("app/assets/stylesheets/application.css")
end