You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Dilger (JIRA)" <ji...@apache.org> on 2013/06/20 17:09:20 UTC

[jira] [Updated] (WICKET-5244) ConcatBundleResource creates invalid JavaScript for Lazy Developers

     [ https://issues.apache.org/jira/browse/WICKET-5244?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Dilger updated WICKET-5244:
----------------------------------

    Attachment: 0001-WICKET-5244-Dynamically-add-Separators-for-combined-resources.patch

And here it is.

Separates ConcatBundleResource into separate Files. Currently, there is no special action for CSS Files, but can be adjusted in CssConcatResourceBundle very easily.

Feel free to improve on this, as it is as always only a suggestion.
                
> ConcatBundleResource creates invalid JavaScript for Lazy Developers
> -------------------------------------------------------------------
>
>                 Key: WICKET-5244
>                 URL: https://issues.apache.org/jira/browse/WICKET-5244
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.8.0
>            Reporter: Martin Dilger
>            Priority: Minor
>         Attachments: 0001-WICKET-5244-Dynamically-add-Separators-for-combined-resources.patch
>
>
> ResourceBundles are a great Feature.
> But consider a Javascript-Library is lazily developed and has neither semicolon nor carriagereturn at the end.
> What ConcatResourceBundle does is, it combines all libraries as they are, which can result in an invalid JavaScript.
> Consider you have 2 files, with content:
> - console.log(1)
> - console.log(2)
> This would result in a Script console.log(1)console.log(2) which is invalid. 
> I would suggest to fix that by always appending a Semicolon between Resources. This could create some noise in the resulting Javascript, but should be fixed anyway. I´ll provide a Patch in a few minutes with a Testcase, that shows the Behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira