Lato
Basic engine for all Lato projects.
Installation
Add required dependencies to your application’s Gemfile:
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails] gem "importmap-rails" # NOTE: Probably already installed in default rails 7 project # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev] gem "turbo-rails" # NOTE: Probably already installed in default rails 7 project # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev] gem "stimulus-rails" # NOTE: Probably already installed in default rails 7 project # Use Kredis as Redis interface [https://github.com/rails/kredis] # NOTE: Installation -> https://github.com/rails/kredis#installation gem "kredis" # Use Sass to process CSS gem "sassc-rails" # Use lato as application panel gem "lato"
Install gem and run required tasks:
$ bundle $ rails active_storage:install $ rails lato:install:application $ rails lato:install:migrations $ rails db:migrate
Mount lato routes on the config/routes.rb file:
Rails.application.routes.draw do mount Lato::Engine => "/lato" # .... end
Import Lato Scss on app/assets/stylesheets/application.scss file:
@import 'lato/application'; // ....
Import Lato Js on app/javascript/application.js file:
import "lato/application"; // ....
Setup I18n on the config/application.rb file:
module MyApplication class Application < Rails::Application config.i18n.available_locales = [:it, :en] config.i18n.default_locale = :it # ... end end
Development
Be sure to have Redis locally installed and running.
Clone repository, install dependencies, run migrations and start:
$ git clone https://github.com/Lato-GAM/lato $ cd lato $ bundle $ rails db:migrate $ foreman start -f Procfile.dev
Publish
$ ruby ./bin/publish.rb
License
The gem is available as open source under the terms of the MIT License.