Giter Site home page Giter Site logo

daveeel / livescript-alloy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from itzaks/lazy-alloy

1.0 1.0 0.0 159 KB

livescript & jade preprocessor for titaniums alloy-framework

JavaScript 0.69% CoffeeScript 72.85% HTML 0.64% Makefile 0.71% LiveScript 25.11%

livescript-alloy's Introduction

livescript-alloy

livescript-alloy is a LiveScript & Jade preprocessor for Titanium Alloy Framework.

This utility is a fork from lazy-alloy which uses CoffeeScript

Why?

It makes you write less code so that your could focus more on getting things done faster instead of syntax details. Optionally, LiveScript allows more functional thinking than CoffeeScript. See LiveScript Official Website for more insight.

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

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

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

Usage

Dependencies

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

Installation

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

Note regarding the *.ls โ€“> *.tss conversion

The files need to be valid livescript 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: livealloy [COMMAND] [OPTIONS]

Commands:

  compile                Just compile.
  watch                  Watch file changes & compile.
  build <platform>       Run titanium on `platform`
  new                    Setup the livescript-alloy directory structure.
  generate <type> <name> Generate a new (livescript-)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/`)

livescript-alloy's People

Contributors

buddhi-desilva avatar daveeel avatar itzaks avatar kenhkan avatar konstantinko avatar pct avatar roger-nextoken avatar

Stargazers

 avatar

Watchers

 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.