Skip to content

Commit

Permalink
Merge remote-tracking branch 'issue_15/bundle_name'
Browse files Browse the repository at this point in the history
Resolves #15
  • Loading branch information
moshen committed May 24, 2014
2 parents d8c2211 + ba3a29d commit f74ef40
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -153,6 +153,7 @@ following represents the default configuration:
server_url:
remove_bundled: false
dev: false
bundle_name: false
markup_templates:
js: "<script type='text/javascript' src='{{url}}'></script>\n"
css: "<link rel='stylesheet' type='text/css' href='{{url}}' />\n"
Expand Down Expand Up @@ -238,6 +239,12 @@ is set to true.

Default: `false`.

### bundle_name:

Overwrites bundle name. When false, MD5 hash of the content is used instead.

Default: `false`

### markup_templates:

Use the relevant markup\_template options to override the default templates
Expand Down
2 changes: 1 addition & 1 deletion asset_bundler.rb
Expand Up @@ -240,7 +240,7 @@ def load_content()
end
}

@hash = Digest::MD5.hexdigest(@content)
@hash = @config['bundle_name'] || Digest::MD5.hexdigest(@content)
@filename = "#{@hash}.#{@type}"
cache_file = File.join(cache_dir(), @filename)

Expand Down

0 comments on commit f74ef40

Please sign in to comment.