Titanium Package for Visual Studio Code

October 29, 2023 ยท View on GitHub

Version Installs

Titanium build tools and editor additions for Visual Studio Code.

Titanium extension for VS Code

Installation

Via the browser

  1. Open the extension on the Visual Studio Marketplace
  2. Click "Install"

In VS Code

  1. Open the Extension view, type in Titanium
  2. Select the "Titanium" extension by TiDev
  3. Click "Install"
  4. Reload VS Code

Features

Commands

This extension makes the following commands available in the Command Palette to enhance your development experience.

CommandDescriptionKeybinding
Titanium: Create applicationCreate a new Titanium application project-
Titanium: Create keystoreCreate keystore-
Titanium: Create moduleCreate a new Titanium module project-
Titanium: Enable LiveViewEnable LiveView-
Titanium: Disable LiveViewDisable LiveView-
Titanium: BuildBuild a Titanium projectMac: cmd+alt+enter
Windows/Linux: ctrl+alt+enter
Titanium: PackagePackage a Titanium project-
Titanium: StopStop a running build or package processMac: cmd+alt+.
Windows/Linux: ctrl+alt+.
Titanium: Set log levelSet log level-
Titanium: Generate Alloy controllerGenerate Alloy controller-
Titanium: Generate Alloy migrationGenerate Alloy migration-
Titanium: Generate Alloy modelGenerate Alloy model-
Titanium: Generate Alloy styleGenerate Alloy style-
Titanium: Generate Alloy viewGenerate Alloy view-
Titanium: Generate Alloy widgetGenerate Alloy widget-
Titanium: Open related viewOpen related viewMac: cmd+alt+v
Windows/Linux: ctrl+alt+v
Titanium: Open related styleOpen related styleMac: cmd+alt+s
Windows/Linux: ctrl+alt+s
Titanium: Open related controllerOpen related controllerMac: cmd+alt+x
Windows/Linux: ctrl+alt+x
Titanium: Open related filesOpen related filesMac: cmd+alt+a
Windows/Linux: ctrl+alt+a
Titanium: Fix environment issuesFix environment issues-
Titanium: Check For UpdatesCheck For Updates-
Titanium: Install All UpdatesInstall All Updates-
Titanium: Select UpdatesSelect Updates-
Titanium: Clean projectClean project-

Titanium View

This extension provides a Titanium view to the Activity Bar in VS Code. With this view, you can view your available build platform and their targets.

Access to the same commands provided by the Command Palette are available inline on device and platform targets, as well as in the right click context menu

Titanium Activity Pane

Debugging

This extension allows you to debug Titanium applications using the debugger in VS Code. For more information view the debugging documentation.

Tasks

This extension contributes tasks allowing you to customize and orchestrate your own builds. View the task documentation for more information.

Configuration Settings

There are a variety of settings that you can use to customize this extension to your needs. You can find them listed below.

You can learn more about User and Workspace settings in the VS Code documentation.

Setting nameDescriptionDefault Value
titanium.android.keystoreAliasKeystore alias used for packaging Android applicationsNo Default
titanium.android.keystorePathPath to keystore used for packaging Android applicationsNo Default
titanium.build.liveviewWhether to enable LiveView when building applicationstrue
titanium.codeTemplates.jsFunctionEvent handler function template\nfunction ${text}(e){\n}\n
titanium.codeTemplates.tssClassStyle class (.) template\n'.${text}': {\n}\n
titanium.codeTemplates.tssIdStyle ID (#) template\n'#${text}': {\n}\n
titanium.codeTemplates.tssTagStyle tag template\n'${text}': {\n}\n
titanium.general.defaultCreationDirectoryDefault directory to use when creating projectsNo Default
titanium.general.displayBuildCommandInConsoleThe executed build command is written to the output channel to aid debugging. This will include password arguments.true
titanium.general.logLevelLogging level for commands being runinfo
titanium.general.updateFrequencyControls the frequency for how often to show an alert if there are updates available. Updates can always be viewed in the Titanium activity pane. Accepts values in time formats like 60 minutes, 12 hours, 7 days etc.1 day
titanium.general.useTerminalForBuildWhen true build/package commands will be run using the integrated terminal as opposed to using an output channel.true
titanium.package.distributionOutputDirectoryOutput directory for package builds.dist
titanium.project.defaultI18nLanguageDefault language to use for i18n autocomplete.en

Snippet definitions

Snippets for Titanium development

PrefixDescription
tidebugDebug log function
tiinfoInfo log function
titraceTrace log function
tiwarnWarn log function
tierrorError log function
tiaddeventAdd event listener function
tiremeventRemove event listener function
tifireeventFire event function
tialertCreate alert dialog
tioptCreate option dialog
tianimCreate animation
tifileGet file
tisoundCreate sound
tiaudioCreate audio player
tivideoCreate video player
ticameraShow camera

Snippets for Alloy development

PrefixDescription
algloAlloy Globals object
alcfgAlloy CFG object
alargsArguments available in an Alloy controller
alconAlloy create controller function
alcolAlloy create collection function
almodAlloy create model function
alwidAlloy create widget function
ifiosAlloy iOS conditional statement
ifandAlloy Android conditional statement
ifwinAlloy Windows conditional statement

Contributing

See the contributing guide for info

License

Apache License. Version 2.0