Created
April 13, 2016 17:25
-
-
Save hut8/8deec806b5b652ef0bf76a6c6e2fe375 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# frozen_string_literal: true | |
require 'json' | |
require 'open-uri' | |
components = JSON.parse(open('https://rails-assets.org/components.json').read) | |
i = 0 | |
components.each do |c| | |
cn = c['name'] | |
c['versions'].each do |v| | |
cv = "#{cn}##{v}" | |
outpath = "/home/liam/bower-dep-trees/#{cn}" | |
outfile = "/home/liam/bower-dep-trees/#{cn}/#{cv}.txt" | |
puts "[ -e #{outfile} ] || (mkdir -p #{outpath}; bower-dependency-tree --production '#{cv}' &> #{outfile});" | |
i += 1 | |
puts 'bower cache clean' if i % 1000 == 0 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment