From f185a2e03fee822742c0e0e425d89d527d083149 Mon Sep 17 00:00:00 2001 From: Vladimir Dementyev Date: Tue, 17 Dec 2024 11:52:01 -0800 Subject: [PATCH] - minor generator fixes --- CHANGELOG.md | 2 ++ .../wasmify/install/install_generator.rb | 1 + lib/generators/wasmify/pwa/pwa_generator.rb | 16 ++++++++++++++++ lib/wasmify/rails/version.rb | 2 +- 4 files changed, 20 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 872e39e..dc5e7c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## master +- Minor generators updates. + ## 0.2.0 - Add pglite support. diff --git a/lib/generators/wasmify/install/install_generator.rb b/lib/generators/wasmify/install/install_generator.rb index 3e8800b..218bff7 100644 --- a/lib/generators/wasmify/install/install_generator.rb +++ b/lib/generators/wasmify/install/install_generator.rb @@ -89,6 +89,7 @@ def add_tzinfo_data_to_gemfile solid_cache jsbundling-rails cssbundling-rails + tailwindcss-rails thruster kamal byebug diff --git a/lib/generators/wasmify/pwa/pwa_generator.rb b/lib/generators/wasmify/pwa/pwa_generator.rb index 2cd1ace..ae292cf 100644 --- a/lib/generators/wasmify/pwa/pwa_generator.rb +++ b/lib/generators/wasmify/pwa/pwa_generator.rb @@ -7,6 +7,22 @@ def copy_files directory "pwa", "pwa" end + def configure_wasm_dist + prepend_to_file "config/wasmify.yml", <<~EOF + output_dir: pwa + EOF + end + + def install_npm_deps + begin + in_root do + run "(cd pwa/ && yarn install)" + end + rescue + say "Please, make sure to run `yarn install` within the pwa/ folder", :red + end + end + private def wasmify_rails_version = Wasmify::Rails::VERSION diff --git a/lib/wasmify/rails/version.rb b/lib/wasmify/rails/version.rb index 835c12f..a975b46 100644 --- a/lib/wasmify/rails/version.rb +++ b/lib/wasmify/rails/version.rb @@ -2,6 +2,6 @@ module Wasmify module Rails # :nodoc: - VERSION = "0.2.0" + VERSION = "0.2.1" end end