Sha256: cc3518b27fc1509afc702d81ebae6efb7ddecc28b5d90e218db03f8c167c7c86
Contents?: true
Size: 691 Bytes
Versions: 4
Compression:
Stored size: 691 Bytes
Contents
# frozen_string_literal: true module RailsDevtools module AssetProviders class ShakapackerConfig def provider :shakapacker end def paths return @paths if defined?(@paths) shakapacker_config_path = Rails.root.join("config", "shakapacker.yml") shakapacker_config = YAML.load_file(shakapacker_config_path, aliases: true) @paths = Set.new([shakapacker_config["source_path"]]) additional_paths = Set.new(shakapacker_config["additional_paths"]) @paths = @paths.merge(additional_paths).to_a.compact end def used? Rails.root.join("config", "shakapacker.yml").exist? end end end end
Version data entries
4 entries across 4 versions & 1 rubygems