Skip to content

Commit

Permalink
docs and other updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brentonhouse committed Jan 10, 2017
1 parent dceabda commit af7f1f3
Show file tree
Hide file tree
Showing 10 changed files with 292 additions and 34 deletions.
3 changes: 2 additions & 1 deletion controllers/navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ var init = _.once( function() {
$.root = $.args.root ? Alloy.createController( $.args.root.moduleName, $.args.root ).getViewEx( { recurse: true } ) : Ti.UI.createWindow( { id: "window" } );
$.nav = Ti.UI.iOS.createNavigationWindow( {
window: $.root,
id: "nav"
id: "nav",
// backgroundColor: 'transparent',
} );

$.addClass( $.root, 'navbar' );
Expand Down
2 changes: 1 addition & 1 deletion core.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ handler.getAlloyFromFile = function( filename ) {

if( _.toLower( docRoot.nodeName ) === "nativeloop" ) {
docRoot.nodeName = CONST.ROOT_NODE;
docRoot.setAttribute( "module", "/nativeloop" );
docRoot.setAttribute( "module", "/nativeloop/ux" );
}

// Make sure the markup has a top-level <Alloy> tag
Expand Down
32 changes: 32 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<h3 align="center">
<img src="https://cdn.secure-api.org/images/nativeloop_logo_text_256.png" alt="nativeloop logo" />
</h3>

<div align="center">⚡ Developing native mobile apps just got a whole lot more awesome ⚡</div>

---

## CLI Documentation

---

### General Usage

Usage | Synopsis
------|-------
General | `native <Command> [Command Parameters] [--command <Options>]`
Alias | `nativeloop <Command> [Command Parameters] [--command <Options>]`

### Project Development Commands
Command | Description
---|---
[create](create.md) | Creates a new project for native mobile development with {nativeloop}.
[init]() | ![coming soon!](https://img.shields.io/badge/coming-soon-orange.png) Initializes an existing Appcelerator mobile project for development with {nativeloop}.

### Global Options
Option | Description
-------|---------
--help, -h, /? | Prints help about the selected command in the console.
--path `<Directory>` | Specifies the directory that contains the project. If not set, the project is searched for in the current directory and all directories above it.
--version | Prints the client version.

207 changes: 190 additions & 17 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,200 @@

---

## CLI Documentation

```javascript
const status = "Pre-Production Beta!";
const warning = "Breaking changes may be introduced before 1.0.0 release";

developer.read(warning)
.then((⚡) => { return developer.code(⚡); })
.then((code) => { return developer.😀 });
.then((app) => { return users.❤️ });

```

---

### General Usage
# [`{nativeloop} cli`](#nativeloop)

[![npm version](https://badge.fury.io/js/nativeloop.svg)](https://badge.fury.io/js/nativeloop)
[![](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)]()

<!-- TOC depthFrom:2 depthTo:6 insertAnchor:false orderedList:false updateOnSave:true withLinks:true -->

- [Overview](#overview)
- [What is [`{nativeloop}`][]?](#what-is-nativeloop)
- [Features](#features)
- [Quick Start](#quick-start)
- [Install `{nativeloop}`](#install-nativeloop)
- [Option 1: Install Globally](#option-1--install-globally)
- [Option 2: Install Locally](#option-2--install-locally)
- [Option 3: Install using gitTio](#option-3--install-using-gittio)
- [Install Prerequisites/Dependencies](#install-prerequisitesdependencies)
- [Need Help?](#need-help)
- [License](#license)
- [Legal](#legal)

<!-- /TOC -->

## Overview

This is the command line tool for creating and working with existing {nativeloop} mobile applications.

> **:soon: Only a few commands have been implemented at this time.
Feel free to test out the functionality that exists right now and stay tuned
as more features are added soon!**


### What is [`{nativeloop}`][]?

[`{nativeloop}`] is a framework for building awesome native apps using node.js style javascript.
It provides developers with access to an extremely rapid development process
without compromising on the delivered product.

[`{nativeloop}`][] is open-source (MIT) and is built upon the open-source version of [`appcelerator`][]
and other open-source products. If you like what you see, contribute to this and other open-source projects!

### Features

- [x] ECMAScript 2015/ES6 support (using babel transformations)
- [x] Supports Node.js global object: `Promise` (using bluebird but can be easily replaced with your own)
- [x] Supports Node.js core module: `fs` (not complete coverage)
- [x] Supports Node.js core module: `path`
- [ ] Supports Node.js core module: `url`
- [ ] Supports Node.js core module: `querystring`
- [x] Supports relative path usage to workaround https://jira.appcelerator.org/browse/TIMOB-24170
- [x] Uses the latest version of lodash, instead of older version of underscore.js
- [x] Supports installation of modules for your app using [`npm`][]
- [x] Does not require replacing Alloy (globally or per build of appcelerator)
- [x] Several free [`{nativeloop}`][] plugins developed by MobileHero are included and available now
- [x] Build and use your own [`{nativeloop}`][] plugins easily!
- [x] Customize which [`{nativeloop}`][] plugins run per project, platform or deployment type (dev,test,prod)!
- [x] Works great with Appcelerator LiveView! (🎉 _yay!!_ 🎉)
- [x] Supports for camelcase syntax in your Alloy xml views (i.e. `<webView>` instead of `<WebView>` )
- [x] Supports lowercase-dashed syntax in your Alloy views (i.e. `<web-view>` instead of `<WebView>` )


## Quick Start

### Install `{nativeloop}`

#### Option 1: Install Globally

>This is your quickest and easiest way to get started with `{nativeloop}`. Installing globally will
allow it to be accessed by any our your mobile projects.

```bash
npm install -g nativeloop
```

#### Option 2: Install Locally

>Just as quick and easy, but this will allow you to use a specific version `{nativeloop}` for your mobile project. Simply run this in the root of your mobile project!
```bash
npm install --save nativeloop
```

#### Option 3: Install using gitTio

> **:soon: Not available yet, but coming very soon!!**
>Install this as a widget using gitTio (http://gitt.io). We hope to have this option available soon!
```bash
gittio install nativeloop
```

#### Install Prerequisites/Dependencies

>_Our goal is to provide as much automation as possible to make the mobile development
experience as awesome as possible. Currently there are some prerequisites/dependencies that
need to installed manually but we hope to automate some of these in the near future!_


- [OSX] Install latest Xcode from App Store _(7.3.1 as of the time of writing)_
- Install Appcelerator Titanium and Alloy

```bash
npm install -g alloy
npm install -g titanium
```

- [OSX] Install [homebrew](http://brew.sh) _(optional, but highly recommended)_

```bash
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
```

- Install IDE of your choice _(We highly recommend [Microsoft Visual Studio Code](https://code.visualstudio.com), as it is free, fast and works great!)_
- Install Android SDK and NDK

>OSX
```bash
brew install android-sdk
brew install android-ndk
```

>Windows
:soon: Instructions for installing on Windows coming soon!

- There might be a few more items to install... Stay tuned for more detailed instructions

***New mobile project**

*See documentation for create for more details: https://nativeloop.github.io/nativeloop/create

```bash
native create my-cool-app
```

:book: [see documentation for `create`](docs/create.md)

**Upgrading existing Appcelerator mobile project**

> **:soon: Not available yet, but coming very soon!!**
```bash
native init
```

## Need Help?

Please [submit an issue](https://github.com/nativeloop/nativeloop/issues) on GitHub and
provide information about your setup.


## License

[![](http://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)]()

Except for otherwise noted, this project is licensed under the terms of the MIT license. This means you have full access to the
source code and can modify it to fit your own needs.
See the [license.md](https://github.com/nativeloop/nativeloop-cli/blob/master/license.md) file.

This project uses other third party open-source tools.
Please see the [third-party.md](https://github.com/nativeloop/nativeloop-cli/blob/master/license.md) file for more information and licenses.

## Legal

Nativeloop is developed by Superhero Studios and the community and is Copyright (c) 2017 by Superhero Studios Incorporated. All Rights Reserved.

_Superhero Studios Incorporated and this project are in no way affiliated with any of the following companies:_

Usage | Synopsis
------|-------
General | `native <Command> [Command Parameters] [--command <Options>]`
Alias | `nativeloop <Command> [Command Parameters] [--command <Options>]`
- _Appcelerator, Inc_
- _Axway Inc_
- _Apple Inc_
- _Google Inc_

### Project Development Commands
Command | Description
---|---
[create](create.md) | Creates a new project for native mobile development with {nativeloop}.
[init]() | ![coming soon!](https://img.shields.io/badge/coming-soon-orange.png) Initializes an existing Appcelerator mobile project for development with {nativeloop}.
Alloy is developed by Appcelerator and the community and is Copyright (c) 2012 by Appcelerator, Inc. All Rights Reserved.

### Global Options
Option | Description
-------|---------
--help, -h, /? | Prints help about the selected command in the console.
--path `<Directory>` | Specifies the directory that contains the project. If not set, the project is searched for in the current directory and all directories above it.
--version | Prints the client version.
Alloy is made available under the Apache Public License, version 2. See their [license](https://github.com/appcelerator/alloy/blob/master/LICENSE) file for more information.

[alloy]: https://github.com/appcelerator/alloy "alloy"
[npm]: https://www.npmjs.com/ "npm"
[`nativeloop`]: https://github.com/nativeloop/nativeloop-mobile "nativeloop"
[`{nativeloop}`]: https://github.com/nativeloop/nativeloop-mobile "nativeloop"
[`Appcelerator`]: http://www.appcelerator.com/mobile-app-development-products/ "appcelerator"
4 changes: 2 additions & 2 deletions lib/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var events = new EventEmitter( {
maxListeners: 20
} );

events.trigger = eventbus.emit;
events.fire = eventbus.emit;
events.trigger = events.emit;
events.fire = events.emit;

module.exports = events;
9 changes: 7 additions & 2 deletions lib/ux.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var events = require( 'events' );
var ux = {};
module.exports = ux;

ux.createLabel = function( params ) {
ux.createText = ux.createLabel = function( params ) {
params = createDefaultParams( params );
fixFontAttributes( params );
fixLines( params );
Expand All @@ -14,14 +14,19 @@ ux.createLabel = function( params ) {
return view;
}

ux.createImageView = function( params ) {
ux.createImage = ux.createImageView = function( params ) {
console.debug( "creating nativeloop.ImageView" );
params = createDefaultParams( params );
if( params.src ){
params.image = params.src;
}
var view = Ti.UI.createImageView( params );
addEventListeners( params, view );
return view;
}



ux.createView = function( params ) {
params = createDefaultParams( params );
var view = Ti.UI.createView( params );
Expand Down
2 changes: 1 addition & 1 deletion license.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# The MIT License (MIT)

> Copyright (c) 2016 Superhero Studios Incorporated
> Copyright (c) 2017 Superhero Studios Incorporated
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit af7f1f3

Please sign in to comment.