Sha256: f2fb35c350b6379fcca3f8b362f18c1d37fc253a6c6e2a9f69ccdf084f8167e3

Contents?: true

Size: 1.42 KB

Versions: 37

Compression:

Stored size: 1.42 KB

Contents

# frozen_string_literal: true

# Rails 7 using Tailwind CSS and Reusable Styles

self.local_template_path = File.dirname(__FILE__)

gac 'base rails 7 image created'

add_controller('home', 'index', 'bootstrap', 'tailwind')
route("root 'home#index'")

css_install('tailwind')
css_install('bootstrap')

force_copy

copy_file   'home/index.html.erb'       , 'app/views/home/index.html.erb'
copy_file   'home/bootstrap.html.erb'   , 'app/views/home/bootstrap.html.erb'
copy_file   'home/tailwind.html.erb'    , 'app/views/home/tailwind.html.erb'
copy_file   'home/_example.html.erb'    , 'app/views/home/_example.html.erb'
copy_file   'home/home_controller.rb'   , 'app/controllers/home_controller.rb'

copy_file   'application.html.erb'      , 'app/views/layouts/application.html.erb'
copy_file   'application_controller.rb' , 'app/controllers/application_controller.rb'
copy_file   'application.tailwind.css'  , 'app/assets/stylesheets/application.tailwind.css'
copy_file   'Procfile.dev'              , 'Procfile.dev'

replacement_script = <<-JSON
    "build:css_bootstrap": "sass ./app/assets/stylesheets/application.bootstrap.scss:./app/assets/builds/application_bootstrap.css --no-source-map --load-path=node_modules",
    "build:css_tailwind": "tailwindcss -i ./app/assets/stylesheets/application.tailwind.css -o ./app/assets/builds/application_tailwind.css --minify"
JSON

gsub_file   'package.json', /^(.*?)"build:css"(.*?)$/, replacement_script


Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
rails_app_generator-0.3.6 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.3.5 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.3.4 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.3.3 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.3.2 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.3.1 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.3.0 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.43 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.42 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.41 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.40 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.39 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.38 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.37 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.36 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.35 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.34 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.33 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.32 after_templates/rag/tailwind_emulating_bootstrap/_.rb
rails_app_generator-0.2.31 after_templates/rag/tailwind_emulating_bootstrap/_.rb