Sha256: 759526708b1cede777c28f902afb1780ed9fcd4fef7ba79caa7b9c76a502e99f

Contents?: true

Size: 1.65 KB

Versions: 12

Compression:

Stored size: 1.65 KB

Contents

require 'rails/generators/joosy/joosy_base'

module Joosy
  module Generators
    class ApplicationGenerator < ::Rails::Generators::JoosyBase
      source_root File.join(File.dirname(__FILE__), 'templates')

      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
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
joosy-1.1.2 lib/rails/generators/joosy/application_generator.rb
joosy-1.1.1 lib/rails/generators/joosy/application_generator.rb
joosy-1.1.0 lib/rails/generators/joosy/application_generator.rb
joosy-1.1.0.alpha.3 lib/rails/generators/joosy/application_generator.rb
joosy-1.1.0.alpha.2 lib/rails/generators/joosy/application_generator.rb
joosy-1.1.0.alpha.1 lib/rails/generators/joosy/application_generator.rb
joosy-1.0.0.RC7 lib/rails/generators/joosy/application_generator.rb
joosy-1.0.0.RC6 lib/rails/generators/joosy/application_generator.rb
joosy-1.0.0.RC5 lib/rails/generators/joosy/application_generator.rb
joosy-1.0.0.RC4 lib/rails/generators/joosy/application_generator.rb
joosy-1.0.0.RC3 lib/rails/generators/joosy/application_generator.rb
joosy-1.0.0.RC2 lib/rails/generators/joosy/application_generator.rb