Skip to content

Instantly share code, notes, and snippets.

@daveaugustine
Created November 9, 2011 22:51
Show Gist options
  • Save daveaugustine/1353424 to your computer and use it in GitHub Desktop.
Save daveaugustine/1353424 to your computer and use it in GitHub Desktop.
Check JS Jammit Manifest for untracked files
# Check the jammit asset manifest for files that have not been tracked
# Only javascripts for now since we gitignore sass generated .css files
# TODO check for .css and .scss files
require 'rubygems'
require 'jammit'
j = Jammit.load_configuration(Jammit::DEFAULT_CONFIG_PATH)
files = j.configuration[:javascripts].values.flatten.uniq
errors = []
files.each do |f|
errors.push f if `git ls-files #{f}`.empty?
end
if errors.length > 0
puts 'Jammit doesn\'t have: ' << errors.join(", ")
flag = true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment