Sha256: 3e7df4b9d70b781dd0b83f7f230934e38bdbb5e492b4037677f53593fe6b7d3b
Contents?: true
Size: 726 Bytes
Versions: 1
Compression:
Stored size: 726 Bytes
Contents
# frozen_string_literal: true module Parcel module Rails class Runner def self.from_command_line(args) return from_config if args.empty? new(args) end def self.from_config to_args(::Rails.application.config.parcel) end def self.to_args(config) new([*config.entry_points, '-d', config.destination]) end def initialize(args) @args = args end def compile parcel_commmand(:build) end def serve parcel_commmand end private def parcel_commmand(cmd = '') command = "yarn run parcel -- #{cmd} #{@args.join(' ')}" output = exec(command) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
parcel-rails-0.9.2 | lib/parcel/rails/runner.rb |