Sha256: 93f030c28df07d50b68a65132181175e084a6a9cece64e81dc46235693b7de30
Contents?: true
Size: 610 Bytes
Versions: 12
Compression:
Stored size: 610 Bytes
Contents
require 'rails/generators' module Rails module Generators class Base < Thor::Group protected def add_to_manifest(manifest, &block) if File.exists? "app/javascript/packs/#{manifest}" append_file "app/javascript/packs/#{manifest}", &block else create_file "app/javascript/packs/#{manifest}", &block end end def yarn(package, version = nil) return if system("yarn add #{package}#{'@' + version if version}") raise Thor::Error.new("yarn failed to install #{package} with version #{version}") end end end end
Version data entries
12 entries across 12 versions & 2 rubygems