On 6/22/15, 2:14 PM, "Michael Schmalle" <teotigraphix...@gmail.com> wrote:
>On Mon, Jun 22, 2015 at 12:28 PM, Frédéric THOMAS ><webdoubl...@hotmail.com> >wrote: > >> >> > FlexJS uses the MXMLFlexJSPublisher.java which uses GoogDepsWriter. >> > GoogDepsWriter scans the .js files for an <inject_html> tag and adds >>that >> > to the index.html. Not quite sure how the externs can take advantage >>of >> > that. In the flex-asjs repo, see: >> > >> > >>frameworks/projects/Jquery/js/src/org/apache/flex/jquery/Application.js >> >> Not sure we can use it without to modify the falcon front end / backend >>to >> introduce a way to inject html from AS (from MetaTag or whatever things, >> AFAIU, it would imply to add a new token, scan, parse and emit it in >>JS.) >> but if the plan as I understood it, is only to build AS/JS components >>with, >> there is no need for that feature as we can insert it has done today, in >> the generated JS, if the plan is to write JS applications (as some of us >> did recently playing with those externs), there is a room for such a >> feature, do we want FlexJS to embark such feature ? >> > >Well I think the plan of the FlexJS framework hasn't changed but, I wrote >the externs stuff so I could play around with a pure JS app in AS. > >So I think the real question is, how is a pure JS app going to be setup, >since I don't have a lot of experience with this stuff yet, you are saying >that stuff can be injected into the index.html right now? Yes. We look through the .js file line-by-line for a special marker, which is hidden inside comments to the JS doesn’t get evaluated. So actually, we could inject this HTML from AS simply by having the cross-compile copy over comments from AS to JS. I’ve been pondering what the packaging options might be. Right now folks are getting things to run because after we cross-compile the AS to JS, Google Closure Library classes are mixed in in order to get scripts loaded, and an index.html is generated to call all of that. We might give folks options for different “Publishers" that package different bootstrapping infrastructure with the cross-compiled code. -Alex