Hi Piotr,
You are right, it sound really good to have wrapper classes for the js
libraries to have a reusable api and abstraction from 3rd party
dependencies.
Let me try :)
10.05.2018 08:59 tarihinde Piotr Zarzycki yazdı:
Serkan,
I'm looking forward to your final classes. You can now create nice
API. Maybe it would be good to have separate classes with that
injections and expose API. As you can see in my link I'm wrapping up
some methods from library and expose mine. :)
2018-05-10 6:59 GMT+02:00 Serkan Taş <serkan....@likyateknoloji.com
<mailto:serkan....@likyateknoloji.com>>:
Hi Piotr and Alex,
Piotr;
I worked on your code and it was starting point of my
implementation. Tank you so much.
Alex,
I now see the that i missed meaning of "has to go in the ASDoc for
the constructor" in your mail belongs to previous thread.
Sorry for misunderstanding and thank you for your clarification.
To show the point mixed up my mind for your referance :
NOT Working Code :
package mx.utils
{
public class BaseTester
{
/**
* The Royale Compiler will inject html into the
index.html file. Surround with
* "inject_html" tag as follows:
*
* <inject_html>
* <script type="text/javascript"
src="http://rawgit.com/beatgammit/base64-js/master/base64js.min.js"
<http://rawgit.com/beatgammit/base64-js/master/base64js.min.js>></script>
* <script type="text/javascript"
src="http://rawgit.com/coolaj86/TextEncoderLite/master/text-encoder-lite.min.js"
<http://rawgit.com/coolaj86/TextEncoderLite/master/text-encoder-lite.min.js>></script>
* </inject_html>
*/
*/** */*
public function BaseTester()
{
}
}
}
Working Code :
package mx.utils
{
public class BaseTester
{
/**
* The Royale Compiler will inject html into the
index.html file. Surround with
* "inject_html" tag as follows:
*
* <inject_html>
* <script type="text/javascript"
src="http://rawgit.com/beatgammit/base64-js/master/base64js.min.js"
<http://rawgit.com/beatgammit/base64-js/master/base64js.min.js>></script>
* <script type="text/javascript"
src="http://rawgit.com/coolaj86/TextEncoderLite/master/text-encoder-lite.min.js"
<http://rawgit.com/coolaj86/TextEncoderLite/master/text-encoder-lite.min.js>></script>
* </inject_html>
*/
public function BaseTester()
{
}
}
}
10.05.2018 01:04 tarihinde Alex Harui yazdı:
Hi Serkan,
It is hard to tell from your description what you are trying, but as I mentioned
in the other thread, the <inject_html> must be in an ASDoc comment for the
constructor function of a class. You can't put it anywhere in the class file.
Show us the code that isn't working if you are still not understanding what
I am saying.
Thanks,
-Alex
On 5/9/18, 1:45 PM, "Serkan Taş"<serkan....@likyateknoloji.com>
<mailto:serkan....@likyateknoloji.com> wrote:
Hi Alex,
After working on the probabilities, i discovered that under several
circumstances the <inject_html> is being broken by the compiler.
Here is my case :
1. I created a simple class
2. Inserted inject_html section as first item in class
3. Built the project and can see that the script are included.
4. Put any definition and/or declaration between the inject_html and
constructor - even empty comment like /** */
5. The compiler fails to generate the script includes in the index.html
This may be bug or something ?
--
Piotr Zarzycki
Patreon: _https://www.patreon.com/piotrzarzycki_