-
1. Re: Is CommonJS code possible?
julien_viet Aug 23, 2012 8:44 AM (in response to gboeve)Hi,
you are right, for now you should take your script and adapt it to the GateIn format and reference it in the <script/> tag.
We are in the process of adding support native Requires.JS module to GateIn JS support which is actually missing to allow your use case to work. It will be in GateIn 3.4 I think.
We will add a <native-script> tag that will work with Requires.JS module.
We understand that today GateIn HAS TO SUPPORT such use case.
Once it is available in GateIn master and if you can build GateIn yourself you could use it and provide feedback to help us make this work, that's really something we want to be possible to do with GateIn asap.
-
2. Re: Is CommonJS code possible?
gboeve Aug 23, 2012 4:21 PM (in response to julien_viet)Thanks Julien, for your reply.
If you have added the RequireJS native support to GateIn I will try to use it and give you feedback.
For now I will try to find an other solution.
-
3. Re: Is CommonJS code possible?
hoang_to Aug 27, 2012 7:09 AM (in response to julien_viet)Julien Viet wrote:
Hi,
you are right, for now you should take your script and adapt it to the GateIn format and reference it in the <script/> tag.
We are in the process of adding support native Requires.JS module to GateIn JS support which is actually missing to allow your use case to work. It will be in GateIn 3.4 I think.
We will add a <native-script> tag that will work with Requires.JS module.
We understand that today GateIn HAS TO SUPPORT such use case.
Once it is available in GateIn master and if you can build GateIn yourself you could use it and provide feedback to help us make this work, that's really something we want to be possible to do with GateIn asap.
The idea of <native-script> could be applied only to category of JavaScript files already in AMD format. For CommonJS stuff, the most painful work is to convert the code JS from CommonJS 's module format into AMD format.
-
4. Re: Is CommonJS code possible?
hoang_to Aug 29, 2012 3:05 AM (in response to hoang_to)You could find in the link basical modifications to have CommonJS works in GateIn (with <native-script> feature supported)
https://docs.jboss.org/author/display/GTNPORTAL/GDG-CommonJS