lib/bower-vendor/utils.rb in bower-vendor-0.0.3 vs lib/bower-vendor/utils.rb in bower-vendor-0.0.4

- old
+ new

@@ -14,10 +14,18 @@ err << ': ' << e.to_s if e.to_s raise RuntimeError, err end end - def prefixed_path(package, prefix, path) + def prefixed_source(package, path) + if path =~ /^#{BowerVendor::BOWER_ROOT}/ + path + else + File.join(BowerVendor::BOWER_ROOT, package, path) + end + end + + def prefixed_dest(package, prefix, path) File.join('vendor', 'assets', prefix, package, path) end def merged_paths if bower_json.has_key? 'sources'