/
githubmirror
/
meteor
Обзор
Документация
Войти
/
githubmirror
/
meteor
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
devel
scripts/admin/check-package-dependencies.rb
26 строк
771 B
Sashko Stubailo
Add check dep to Blaze
31 июл 2015, 02:31
31 июл 2015, 02:31
8918467
Код
Авторство
О чём код?
#! /usr/bin/env ruby # This script takes two arguments: # 1. The name of an export - ex. EJSON # 2. The name of a package - ex. ejson # It makes sure that if the export appears somewhere in package source code, the # name of the package appears somewhere in package.js for that package. root = File.join(File.dirname(__FILE__), "..", ".."); Dir.chdir(root) file_list = `git grep -lw '#{ARGV[0]}' packages/`.lines package_list = file_list.map do |filename| filename.split("/")[1] end package_list = package_list.uniq package_list.each do |p| unless File.open("packages/#{p}/package.js").read.include? ARGV[1] puts "'#{ARGV[0]}' appears in #{p} but '#{ARGV[1]}' not in package.js. Files:" puts `git grep '#{ARGV[0]}' packages/#{p}/` puts "" end end