This Titanium CLI plugin transforms JS files with Babel.
Note: This plugin requires the base support plugin ti.transform
.
See the section Installation.
Install ti.transform
according to its Installation guide.
Then refer to the next section:
Run this command in a Titanium project directory
npm install --save-dev ti.transform.babel
The plugin will install itself to the project's local /plugins
directory.
After that you need to enable the plugin in your tiapp.xml
.
Add the following XML element to the <plugins/>
section:
<plugins/>
section:
<plugins>
...
<plugin version="0.1.0">ti.transform.babel</plugin>
</plugins>
Install ti.transform
according to its Installation guide.
Then refer to the next section:
At first, download the plugin.
Then copy the plugin code into the project's local /plugins
directory:
${project}/plugins/ti.transform.babel/0.1.0/{plugin_files}
After that add the following XML element to the <plugins/>
section:
<plugins>
...
<plugin version="0.1.0">ti.transform.babel</plugin>
</plugins>
The plugin doesn't enable any Babel plugins or presets by default.
You need to configure them by creating a .babelrc
file in your project.
Refer to the Babel documentation:
See the example project ti.transform-example
MIT