Git Product home page Git Product logo

lazy-alloy's Introduction

lazy-alloy

lazy-alloy is a CoffeeScript & Jade preprocessor for Titanium Alloy Framework.

##What does it do?

It makes you write a tiny bit less code. Perhaps also a bit more readable (¿¿¿) code as well.

Compile from sourcefile To alloy readable output
src/controllers/{{name}}.coffee app/controllers/{{name}}.js
src/styles/{{name}}.coffee app/styles/{{name}}.tss
src/views/{{name}}.jade app/views/{{name}}.xml
src/models/{{name}}.coffee app/models/{{name}}.js
src/lib/{{name}}.coffee app/lib/{{name}}.js

Also, it will compile your widgets from src/widgets stored in the following directories.

From To
src/widgets/{{name}}/controllers/*.coffee app/widgets/{{name}}/controllers/*.js
src/widgets/{{name}}/styles/*.coffee app/widgets/{{name}}/styles/*.tss
src/widgets/{{name}}/views/*.jade app/widgets/{{name}}/views/*.xml

Inspired by coffee-alloy but eventually grew out of its box. Feel free to improve.

Usage

Dependencies

  • nodejs
  • npm
  • titanium (cli)
  • alloy
  • brain (optional)

Installation

  1. Install Titanium Alloy Framework.
  2. npm install -g lazy-alloy

Note regarding the *.coffee –> *.tss conversion

The files need to be valid coffee-script objects; thus the first line of these files needs to be a variable assignment like the following

tss =
  ".container":
    backgroundColor: "red"

  "Label":
	width: Ti.UI.SIZE
	height: Ti.UI.SIZE
	color: "#fff"

Its output will look like this:

".container": {
  backgroundColor: "red"
},
"Label": {
  width: Ti.UI.SIZE,
  height: Ti.UI.SIZE,
  color: "#fff"
}

Perhaps something like stylus would be a better fit for this kind of job. Feel free to help us improve this section!

###Options Usage: lazyalloy [COMMAND] [OPTIONS]

Commands:

  compile                Just compile.
  watch                  Watch file changes & compile.
  build <platform>       Run titanium on `platform`
  new                    Setup the lazy-alloy directory structure.
  generate <type> <name> Generate a new (lazy-)alloy type such as a controller.

Options:

  -h, --help                 output usage information
  -V, --version              output the version number
  -p, --platform [platform]  (watch) When done, run titanium on `platform`
  -d, --directory [dirname]  Set source directory (default `src/`)

AFRICA!

lazy-alloy's People

Contributors

buddhi-desilva avatar itzaks avatar kenhkan avatar konstantinko avatar pct avatar

Stargazers

 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

lazy-alloy's Issues

Create recursively folder

Hi,
I found a bug while in compile *.coffeeScript and *.jade
When your jade or coffeeScript files are in a folder lazy alloy can't create folder and can't compile them.

Ignore .svn folders

Hi,
Please fix this bug.
I got error when I have .svn folders in my folders

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.