Closed yahya-uddin closed 5 years ago
Any update on this?
Might be tricky to get working. I think AppC transpiles on build. TS just pushing the source code to the device (after Alloy complie). I have been using JAST for longer than this for ES6 with TiShadow.
Any reason why the transpile option is not being recognised by tishadow? Is it reading a different tiapp.xml file or something?
I think you need to understand how both Ti and TS work under the hood. Ti only transpiles when doing a final build. When TS pushes code to the device (or even the initial 'build') it will compile the alloy to js then bundles and sends it to the device. The transpiling is therefore skipped.
Oh darn. That's annoying. Do you think it's worth asking Appcelerator on Jira for a feature request so that we can transpile as well in the initial build.
Titanium has a transpile option that allows writing in ES6 as described in this post:
https://www.appcelerator.com/blog/2018/06/using-es6-in-a-titanium-app/
But I can't seem to get it to work on TiShadow.
When I create even a empty class like:
I get this error:
But normal compiles work just fine such as:
Perhaps the transpile option in the
tiapp.xml
of the app is not being passed through the tishadow compiler in: https://github.com/dbankier/TiShadow/blob/master/cli/support/compiler.js