-
Notifications
You must be signed in to change notification settings - Fork 342
Appending extensions in the url files #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a3ba728
Add gzip on configuration
joshjo d683631
cleaning prints
joshjo 03066aa
Move extension to template tag
joshjo c930dab
Updated README.md, to append suffix in template tag
joshjo 135692b
Merge branch 'master' into master
joshjo ea88a20
Merge branch 'master' into append-extensions
joaopslins 5c07961
Merge remote-tracking branch 'origin/master' into append-extensions
joaopslins f9aba7e
Adds append extensions test
joaopslins ec1e944
Improves formatting
joaopslins 57d183d
Improves formatting
joaopslins File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Move extension to template tag
- Loading branch information
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,8 @@ def get_files(bundle_name, extension=None, config='DEFAULT'): | |
| return list(_get_bundle(bundle_name, extension, config)) | ||
|
|
||
|
|
||
| def get_as_tags(bundle_name, extension=None, config='DEFAULT', attrs=''): | ||
| def get_as_tags( | ||
| bundle_name, extension=None, config='DEFAULT', suffix='', attrs=''): | ||
| ''' | ||
| Get a list of formatted <script> & <link> tags for the assets in the | ||
| named bundle. | ||
|
|
@@ -48,11 +49,11 @@ def get_as_tags(bundle_name, extension=None, config='DEFAULT', attrs=''): | |
| if chunk['name'].endswith(('.js', '.js.gz')): | ||
| tags.append(( | ||
| '<script type="text/javascript" src="{0}" {1}></script>' | ||
| ).format(chunk['url'], attrs)) | ||
| ).format(''.join([chunk['url'], suffix]), attrs)) | ||
| elif chunk['name'].endswith(('.css', '.css.gz')): | ||
| tags.append(( | ||
| '<link type="text/css" href="{0}" rel="stylesheet" {1}/>' | ||
| ).format(chunk['url'], attrs)) | ||
| ).format(''.join([chunk['url'], suffix]), attrs)) | ||
|
||
| return tags | ||
|
|
||
|
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.