class Geoblacklight::Webpacker

Public Instance Methods

javascript_install() click to toggle source
# File lib/generators/geoblacklight/webpacker_generator.rb, line 22
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
procfile() click to toggle source
# File lib/generators/geoblacklight/webpacker_generator.rb, line 18
def procfile
  copy_file 'Procfile', 'Procfile'
end
webpacker_config() click to toggle source
# File lib/generators/geoblacklight/webpacker_generator.rb, line 14
def webpacker_config
  copy_file 'webpacker.yml', 'config/webpacker.yml'
end
webpacker_install() click to toggle source
# File lib/generators/geoblacklight/webpacker_generator.rb, line 10
def webpacker_install
  run 'bundle exec rails webpacker:install'
end