bin/sprockets in sprockets-2.2.0.beta vs bin/sprockets in sprockets-2.2.0

- old
+ new

@@ -62,14 +62,19 @@ opts.warn e.message opts.show_usage end end -environment.append_path(".") +if environment.paths.empty? + warn "No load paths given" + warn "Usage: sprockets -Ijavascripts/ filename" + exit 1 +end if manifest manifest.compile(filenames) +elsif filenames.length == 1 + puts environment.find_asset(filenames.first).to_s else - filenames.each do |filename| - puts environment.find_asset(filename).to_s - end + warn "Only one file can be compiled to stdout at a time" + exit 1 end