Sha256: 9df0e5c92402e4f647e227e607529cd4c1d05f3d50d07a5e48cc3640bda198c2
Contents?: true
Size: 609 Bytes
Versions: 16
Compression:
Stored size: 609 Bytes
Contents
require 'jsduck/util/json' module JsDuck module Options # Handles reading of JSB3 files. class Jsb # Extracts files of first build in JSB3 file. def self.read(filename) json = Util::Json.read(filename) basedir = File.dirname(filename) return json["builds"][0]["packages"].map do |package_id| package = json["packages"].find {|p| p["id"] == package_id } (package ? package["files"] : []).map do |file| File.expand_path(basedir + "/" + file["path"] + file["name"]) end end.flatten end end end end
Version data entries
16 entries across 16 versions & 3 rubygems