Class: Wasmify::PwaGenerator
- Inherits:
- 
      Rails::Generators::Base
      
        - Object
- Rails::Generators::Base
- Wasmify::PwaGenerator
 
- Defined in:
- lib/generators/wasmify/pwa/pwa_generator.rb
Instance Method Summary collapse
Instance Method Details
#configure_wasm_dist ⇒ Object
| 10 11 12 13 14 | # File 'lib/generators/wasmify/pwa/pwa_generator.rb', line 10 def configure_wasm_dist prepend_to_file "config/wasmify.yml", " output_dir: pwa/public\n EOF\nend\n" | 
#copy_files ⇒ Object
| 6 7 8 | # File 'lib/generators/wasmify/pwa/pwa_generator.rb', line 6 def copy_files directory "pwa", "pwa" end | 
#install_npm_deps ⇒ Object
| 16 17 18 19 20 21 22 23 24 | # File 'lib/generators/wasmify/pwa/pwa_generator.rb', line 16 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 |