Sha256: f077889d3fc386436d0cb046d3064efbe3d653d4cc9544af297c79263218e170
Contents?: true
Size: 821 Bytes
Versions: 2
Compression:
Stored size: 821 Bytes
Contents
require 'rails/generators' module Geoblacklight class Webpacker < Rails::Generators::Base source_root File.expand_path('../templates', __FILE__) desc 'Integrate Webpacker for GeoBlacklight' def webpacker_install run 'bundle exec rails webpacker:install' end def webpacker_config copy_file 'webpacker.yml', 'config/webpacker.yml' end def procfile copy_file 'Procfile', 'Procfile' end def javascript_install # This overrides the default dependencies specified using # webpacker:install copy_file 'package.json', 'package.json' yarn_available = system('yarn --version') if yarn_available run 'yarn install' run 'yarn upgrade' else run 'npm install' run 'npm update' end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
geoblacklight-2.4.0 | lib/generators/geoblacklight/webpacker_generator.rb |
geoblacklight-2.3.0 | lib/generators/geoblacklight/webpacker_generator.rb |