Giter Site home page Giter Site logo

component-alloy's Introduction

component-alloy

Component support for Titanium's Alloy framework.

Prerequisites

Knowledge and understanding of the Component Framework and Titanium's Alloy Framework

Setup

  1. Install component-alloy into the 'plugins' directory located at the root of your Titanium/Alloy project.
  2. Update your tiapp.xml to use the component-alloy plugin.
  3. Place your component.json file in the 'app' directory.
  4. Install your remote components by going to the 'app' directory in a terminal and run 'component install -f'.
  5. You are ready to go!

Using a Component in Alloy

In any Alloy js file you can access a component with the following:

var myCoolComponent = require('component')('my-cool-component');

Alloy Widgets as Components

With Component it's very easy to distribute your reusable Alloy Widget. As with normal Components, just create a repo on Github for your Widget. In addition to your normal Widget files, add a 'component.json' to your repo in the same directory as your 'widget.json'.

Here is an example of a Widget's 'component.json' file:

{
    "name":"panels",
    "version":"0.0.1",
    "files":[
        "widget.json",
        "controllers/widget.js",
        "styles/widget.tss",
        "views/widget.xml",
        "assets/images/pixel.png"
    ]
 }

component-alloy's People

Contributors

btknorr avatar

Watchers

 avatar  avatar

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.