Module: Interfacets::Server::Assets
- Defined in:
- lib/interfacets/server/assets.rb,
lib/interfacets/server/assets/facet.rb
Defined Under Namespace
Classes: Classifier, Const, Facet, Serializer
Constant Summary collapse
- GEM_DIRS =
[ File.(File.join(__dir__, "../shared")), File.(File.join(__dir__, "../client")), File.(File.join(__dir__, "../client.rb")), ].freeze
Class Method Summary collapse
Class Method Details
.bundle(dirs:, registry:, only_facets: false) ⇒ Object
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/interfacets/server/assets.rb', line 184 def bundle(dirs:, registry:, only_facets: false) target_dirs = ( if only_facets dirs else GEM_DIRS + dirs end ) target_dirs .flat_map { paths(_1) } .flatten .map(&:to_s) .then { Serializer.new(paths: _1).as_json } end |