Code Monkey home page Code Monkey logo

pulsar-titanium's Introduction

Titanium SDK Package for Pulsar

Titanium SDK build tools and UI for the Pulsar text editor (formally Atom).

Titanium SDK for Pulsar screenshot

Getting Started

  • Pulsar is required.
  • Install titanium package.

Using the Pulsar package manager

Preferences/Settings > Install > Search for titanium.

Using the CLI:

Use ppm (Pulsar package manager):

pulsar --package install pulsar-titanium

You can also use the repo URL to install the latest repo version:

pulsar --package install https://github.com/tidev/pulsar-titanium

Open a Titanium project

File > Open... > Browse to Titanium project

From the CLI:

pulsar /path/to/titanium/project

Features

Commands

Command Keymap Description
appc:build ctrl-alt-enter Build using the current selected command and configuration
appc:stop None Stop the current build
appc:console None Toggle the console
appc:generate None Open dialog to generate a new alloy file or component
appc:take-screenshot None Take a screenshot of the currently running device
appc:open view ctrl-alt-v Open the related Alloy XML file
appc:open style ctrl-alt-s Open the related Alloy TSS file
appc:open controller ctrl-alt-x Open the related JavaScript file
appc:open close related ctrl-alt-a Toggle the related Alloy XML, TSS and Javascript files
appc:clean ctrl-alt-k Clean the current project directory

Build tools

Selecting Tooling

By default this package will use the Titanium CLI tooling. You can switch to the Titanium CLI tooling by enabling the Use ti commands property in the package settings.

Toolbar

The toolbar provides a UI to commonly used commands when developing a Titanium application. Further information on each function is provided in the sections below.

Toolbar

1. Build select and run

Select to run on simulator or device, package for ad-hoc or App Store distribution or a custom build option.

2. Platform select

Select available platforms to build for.

3. Target select

Select simulator/emulator or local device. When attaching a device, select Refresh Targets option to add it to the target list.

4. Code signing / Android KeyStore configuration

When building for device (iOS) or distribution (iOS and Android) the option to configure code signing or keystore credentials is available.

5. LiveView toggle

Toggle the LiveView icon to enable or disable LiveView in your application.

6. Info panel

Provides information about the active project.

7. Generate component

Presents a dialog to generate a Titanium component: Controller, View, Style, Model, Widget or Alloy.jmk file.

8. Console

Show or hide the console which outputs debug information during build and run.

Build

The build select button executes and provides selections of the build command. Depending on the target platform selected, the drop-down will display options for the ti build command:

Build command select

  • Run: Build and run the app on selected simulator/emulator or device
  • Ad-Hoc: (iOS only) build and package the app for Ad-Hoc distribution using selected code signing
  • Publish: Build and package the app for distribution through the App Store or Google Play using selected code signing or keystore credentials
  • Custom: Execute ti build -d <project_dir> with custom arguments

Console

Build command select

The console displays debug logging during the build and run. The log level is passed to the ti build command so selecting the log level does not alter output from the currently executing command. There are options to automatically scroll the console to the latest message and to open it when a build is initiated.

By default the executing command is displayed in the console to aid debugging. This can be disabled in the package settings.

iOS code signing

When building for a device and ad-hoc or App Store distribution, a certificate and provisioning profile must be selected. Click the code signing / keystore button (#4) to display the code signing options.

iOS code signing

Certificates are populated according to the selected build option (developer / distribution). Available provisioning profiles are displayed but only those which match the selected certificate and app ID are enabled.

Android KeyStore

When building for distribution through Google Play, the app must be signed with a keystore. Click the code signing / keystore button (#4) to display the keystore options.

Android keystore

The path to the keystore can be entered manually or by using the file picker. Keystore path and alias are stored in package configuration.

Autocompletion

Autocompletion support is provided to help speed up development by providing quick references to Titanium APIs and Alloy markup as well as references to modules, widgets and assets within your project.

Generation

On initial launch, autocomplete suggestions are generated for the current selected Titanium SDK. You can check and set this using the CLI:

$ ti sdk

...

Installed SDKs:
   7.2.0.GA [selected]  7.2.0.GA
$ ti sdk select

Autocomplete suggestions can be regenerated by selecting the 'Regenerate autocomplete suggestions' option from the package settings and relaunching Pulsar.

Regenerate autocomplete suggestions option

Titanium and Alloy

Titanium APIs and Alloy markup suggestions are provided in Titanium JavaScript and Alloy XML and TSS files. This includes classes, properties, methods and events. Where appropriate additional information is provided with a link to the online documentation. Deprecated properties are also indicated.

Alloy markup class autocomplete

Project references

Suggestions for other controllers, modules and widgets are presented when referencing through a Titanium function or Alloy markup.

Alloy markup widget reference autocomplete

Class and ID references

Suggestions for classes and IDs declared or defined in related Alloy XML and TSS files are presented.

TSS class reference autocomplete

Images

Image suggestions are presented where appropriate, including a thumbnail preview and information about the scaled versions available.

TSS image reference autocomplete

Alloy file and component generation

Alloy file and component generate dialog

A UI for the alloy generate command is provided. The Generate File dialog is presented by clicking the + icon in the toolbar or using the command from the menu or palette. Select the type of file or component to generate and provide the required information. The generated file(s) are then opened.

Open related files

Opening related Alloy files is supported (see above commands list).

  • From View, open related Style and/or Controller
  • From Style, open related View and/or Controller
  • From Controller, open related View and/or Style

Jump-to-definition

Jump-to-definition support is provided for quickly accessing the definiion or usage of Alloy markup and to easily generate new definitions. Images can be opened directly from their path.

Alloy

From Views, click through to style definitions for tags, classes and IDs, in related or global TSS. Click through to event definitions in the related controller.

View tag style definition

A prompt is displayed to generate undefined styles or functions.

View tag style generate definition

Strings

Click on localised string references to jump to their definition. The option to generate undefined strings is provided.

Images

Click on an image path to open the image in a new tab. For iOS, where multiple scaled images exist with the same name the first is opened (e.g. @2x).

Snippets

Code snippets for common Alloy and Titanium APIs are provided for use in Alloy controllers and modules. A description of the snippet and link to documentation are provided where appropriate. Type the prefix and the autocomplete overlay will be displayed with matching snippets.

Code snippet suggestions

Prefix Description
tidebug Debug log message
tierror Error log message
tiinfo Info log message
tiwarn Warn log message
titrace Trace log message
tiaddevent Add event listener
tiremevent Remove event listener
tifireevent Fire event
tialert Show alert dialog
tiopt Show option dialog
tianim View animation
tifile Open file
tisound Play sound
tiaudio Play local or remote audio
tivideo Play local or remove video
ticamera Open camera
alglo Alloy Globals object
alcfg Alloy CFG object
alcon Alloy create controller function
alcol Alloy create collection function
almod Alloy create model function
alwid Alloy create widget function
ifios iOS conditional statement
ifand Android conditional statement

Contributions

This package would not be possible without support from the Titanium community. Autocompletion, jump-to-definition and grammar support provided by Jong Eun Lee through the Titanium Alloy package. Also a huge thanks to all our open source contributors that help making every release unique for the Titanium community!

Additional thanks

We doff our caps to:

Legal stuff

Titanium is a registered trademark of TiDev Inc. All Titanium trademark and patent rights were transferred and assigned to TiDev Inc. on 4/7/2022. Please see the LEGAL information about using our trademarks, privacy policy, terms of usage and other legal information at https://tidev.io/legal.

pulsar-titanium's People

Contributors

build avatar caspahouzer avatar cb1kenobi avatar chrisbowley avatar dependabot-preview[bot] avatar dependabot[bot] avatar developer82 avatar ewanharris avatar hansemannn avatar jasonkneen avatar longton95 avatar m1ga avatar semantic-release-bot avatar yomybaby avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pulsar-titanium's Issues

Install instructions

Can we add instructions to download it via Atom and/or link the public package once published? Let's make the onboarding as easy as possible.

Uncaught SyntaxError: Unexpected number in JSON at position 4

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.22.1 x64
Electron: 1.6.15
OS: Mac OS X 10.13.2
Thrown From: appcelerator-titanium package 1.0.2

Stack Trace

Uncaught SyntaxError: Unexpected number in JSON at position 4

At file:///Applications/Atom.app/Contents/Resources/app.asar/static/index.html:1

SyntaxError: Unexpected number in JSON at position 4
    at JSON.parse (<anonymous>)
    at exit (/packages/appcelerator-titanium/lib/appc.js:25:23)
    at triggerExitCallback (/Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:338:17)
    at /Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:351:17
    at Socket.<anonymous> (/Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:220:15)
    at emitOne (events.js:101:20)
    at Socket.emit (events.js:188:7)
    at Pipe._handle.close [as _onclose] (net.js:501:12)

Commands

Non-Core Packages

appcelerator-titanium 1.0.2 
build 0.69.0 
busy-signal 1.4.3 
jsdoc-generator 0.2.3 
tishadow 0.2.3 
titanium-build 0.8.1 
titanium-language-javascript 0.48.0 

Improve Appcelerator CLI tools not installed error messaging

Current:

Error fetching environment information. Ensure you have installed Appcelerator CLI tools.

'appc' is not recognized as an internal or external command,
operable program or batch file.

Link to install instructions / npm install -g appcelerator; appc setup

Linux version

Currently not working on Linux but I'll do some more tests soon and try to fix them.

  • build select & run is empty
  • platform list is empty
  • options.args.join is not a function in /lib/index.js:401 if you just click run (caused by above)

Add liveview button

As in Appcelerator Studio, add a toggle button to the toolbar for running the app with liveview flag turned on.

Add support for multiple XCode installs / ios-version argument

Currently, I have Xcode.app (9) and Xcode8.app installed -- due to the trial / upgrade to Xcode 9.

By default, building us defaulting to --ios-version 10.3.1 so if I pick an 11 sim from the list, it's not using --ios-version 11.x -- this results in an error.

Ideally, if you select an 11.x sim, it should use --ios-version 11.x OR it should provide the option to override / specify this.

Add support for Alloy Split View?

Josh Jensen wrote a great package for Atom to support split-view when loading controllers (which loads it's TSS and XML) -- would be great to get this (or a variation of it) into this package.

Add Hyperclick / More atom-titanium features?

Man, I love this project so much! Maybe we can adopt some high-roller from the current #1 Titanium / Atom project atom-titanium? If you want, I can talk to Jong Eun Lee (vendor of the project) if he wants to help contributing here. We may also want to consider open-sourcing it in the near future, so we get early contributions on the items missing.

Showing "Preparing..." message from last 20 minutes or over

Hi team, I am trying to use your Atom package & I did a restart after installing it. But it's showing the Preparing... message from infinite time. I tried it on various projects, but this package is not working on my Atom.

See screenshot, just this "Preparing..." message & no drop-down, no button is working at all.

screen shot 2017-12-10 at 12 38 39 am

My Atom version is 1.22.1

Add support for Ti CLI

Currently uses the appc CLI to build -- it's possible to hack this to use the ti CLI by editing the appc.js to:

 var command = 'ti';
 var args = ['build'].concat(opts.args);

this works but still displays 'appc build' as this is hard-coded in the build process.

Ideally the plug-in should auto-detect presence of the appc parameters in TiApp.xml and then use Ti CLI or Appc CLI.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.