Compiler for Appcelerator Titanium Alloy components, enabling standalone compilation of controllers and views. Current version 0.2.7, updated periodically. Unlike the full Alloy CLI, this package can be integrated into custom build toolchains, including Webpack-based setups. It provides createCompiler and createCompileConfig functions for programmatic use, with support for platform-specific output and source maps. Requires Node >=10.
npm install alloy-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows basic usage to compile an Alloy controller using createCompileConfig and createCompiler.
Use require() or transpile with a bundler like Webpack.
Always provide compileConfig object with projectDir and alloyConfig.
Ensure the file exists or provide content option.
Use const { createCompiler } = require('alloy-compiler');First create compiler with createCompiler, then call compiler.compileComponent().
Add projectDir to the options object: { compileConfig: { projectDir: '/path' } }No dependency data recorded yet.