[
https://issues.apache.org/jira/browse/TAP5-2196?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13813038#comment-13813038
]
Hudson commented on TAP5-2196:
------------------------------
FAILURE: Integrated in tapestry-trunk-freestyle #1179 (See
[https://builds.apache.org/job/tapestry-trunk-freestyle/1179/])
TAP5-2196: RequireJs custom path contribution - via Stacks or (thiagohp: rev
d11b50bc35d64c49076dd16c589987f7e4753517)
*
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/ajax/JavaScriptSupportImpl.java
*
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinker.java
*
tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/ModuleManager.java
*
tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/ModuleConfigurationCallback.java
*
tapestry-core/src/main/java/org/apache/tapestry5/services/javascript/JavaScriptSupport.java
*
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
*
tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/ModuleConfigurationCallbackTests.groovy
*
tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/ModuleConfigurationCallbackDemo.tml
*
tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/ModuleConfigurationCallbackDemo.java
*
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/javascript/ModuleManagerImpl.java
*
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/DocumentLinkerImpl.java
*
tapestry-core/src/main/java/org/apache/tapestry5/internal/services/PartialMarkupDocumentLinker.java
*
tapestry-beanvalidator/src/test/java/org/apache/tapestry5/beanvalidator/integration/TapestryBeanValidationIntegrationTests.java
> RequireJs custom path contribution - via Stacks or JavaScriptSupport
> --------------------------------------------------------------------
>
> Key: TAP5-2196
> URL: https://issues.apache.org/jira/browse/TAP5-2196
> Project: Tapestry 5
> Issue Type: Improvement
> Components: tapestry-core
> Affects Versions: 5.4
> Reporter: Magnus Kvalheim
> Assignee: Thiago H. de Paula Figueiredo
> Labels: requirejs
> Fix For: 5.4
>
>
> Currently I think there is no way to configure requirejs paths.
> Also - the requirejs config is 'global' and all entries included on every
> page.
> Would be good improvement if there were some more flexibility in config and
> more contributions was possible.
> --
> As part of 5.4 migration process we have some components that make use of
> JQueryFileUpload, https://github.com/blueimp/jQuery-File-Upload .
> This library uses the factory approach for defining the modules to work in
> both AMD and non AMD environments.
> Internally it handles loading of required modules, but work with paths. (And
> does not try to load from a fixed directory structure).
> So I think I need to specify things like
> requirejs.config({
> paths: {
> 'jquery.fileupload':
> '../library/jquery.fileupload/jquery.fileupload', //path to file
> 'jquery.iframe-transport':
> '../library/jquery.fileupload/jquery.iframe-transport', //path to file
> 'jquery.ui.widget':
> '../library/jquery.fileupload/vendor/jquery.ui.widget', //path to file
> }
> });
> Currently, only option is to configure shims through tapestry's
> modulemanager, but that's for non-AMD scripts and is likely to cause problems.
> Also the shim config would be global (all pages) - which I'd like to avoid as
> well.
> In 5.3 I've used a JQueryFileUpload to define all the deps like so..
> public List<Asset> getJavaScriptLibraries() {
> List<Asset> ret = new ArrayList<Asset>();
>
> ret.add(assetSource.getContextAsset("jquery-file-upload/7.2.1/js/vendor/jquery.ui.widget.js",
> null));
>
> ret.add(assetSource.getContextAsset("jquery-file-upload/extra/js/load-image.min.js",
> null));
>
> ret.add(assetSource.getContextAsset("jquery-file-upload/extra/js/canvas-to-blob.min.js",
> null));
>
> ret.add(assetSource.getContextAsset("jquery-file-upload/7.2.1/js/jquery.iframe-transport.js",
> null));
>
> ret.add(assetSource.getContextAsset("jquery-file-upload/7.2.1/js/jquery.fileupload.js",
> null));
>
> ret.add(assetSource.getContextAsset("jquery-file-upload/7.2.1/js/jquery.fileupload-fp.js",
> null));
> It would be useful it was possible somehow to contribute to requirejs
> configuration through stacks.
> That way they could be added to the requirejs config if the stack was used.
> If it was a service (perhaps exposed through JavaScriptSupport) one could
> also contribute on a page/component level..?
> I have no idea about the implications of this and if it's possible to
> accomplish, but could potentially help solving some more advanced use cases.
--
This message was sent by Atlassian JIRA
(v6.1#6144)