Skip to content

Instantly share code, notes, and snippets.

@tzmartin
Created August 15, 2013 05:10
Show Gist options
  • Save tzmartin/6238412 to your computer and use it in GitHub Desktop.
Save tzmartin/6238412 to your computer and use it in GitHub Desktop.
- Add a Pre-Compile script in Xcode projects for all Titanium builds. This snippet will pre-compile Alloy projects in Xcode for faster debug workflows.
proj = injectCompileShellScript(
proj,
'Pre-Compile',
"alloy compile "+this.projectDir+"\n\n"+'if [ \\"x$TITANIUM_CLI_XCODEBUILD\\" == \\"x\\" ]; then NO_COLORS=\\"--no-colors\\"; else NO_COLORS=\\"\\"; fi\\n' +
(process.execPath || 'node') + ' \\"' + this.cli.argv.$0.replace(/^(.+\/)*node /, '') + '\\" build --platform ' +
this.platformName + ' --sdk ' + this.titaniumSdkVersion + ' --no-prompt --no-banner $NO_COLORS --xcode\\nexit $?'
);
Path: /Library/Application Support/Titanium/mobilesdk/osx/3.1.1.GA/iphone/cli/commands
![File Path](https://monosnap.com/image/BPdVCumDpEufVkI0M9ArPS1JI.png)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment