# cola-script

> ColaScript translator / parser / mangler / compressor / beautifier toolkit

Latest version **0.8.24** (published 2015-02-03) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install cola-script
pnpm add cola-script
yarn add cola-script
bun add cola-script
```

Provides the command `cola`.

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.8.24 |
| Published | 2015-02-03 |
| First published | 2014-05-23 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=0.4.0 |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 25 |
| Maintainers | dangreen |
| Keywords | cola, colascript, cola-script |

## Links

- npm: https://www.npmjs.com/package/cola-script
- Repository: https://github.com/TrigenSoftware/ColaScript
- Issues: https://github.com/TrigenSoftware/ColaScript/issues
- npm.io page: https://npm.io/package/cola-script

## Dependencies (3)

- [async](https://npm.io/package/async.md) ~0.2.6
- [optimist](https://npm.io/package/optimist.md) ~0.3.5
- [source-map](https://npm.io/package/source-map.md) ~0.1.33

## Recent versions

- 0.8.24 (latest) — 2015-02-03
- 0.8.23 — 2015-01-29
- 0.8.22 — 2015-01-28
- 0.8.21 — 2015-01-28
- 0.8.20 — 2015-01-28
- 0.8.19 — 2015-01-13
- 0.8.18 — 2015-01-12
- 0.8.17 — 2015-01-11
- 0.8.16 — 2015-01-11
- 0.8.15 — 2015-01-11
- 0.8.14 — 2015-01-11
- 0.8.13 — 2015-01-10
- 0.8.12 — 2015-01-10
- 0.8.11 — 2015-01-10
- 0.8.10 — 2015-01-10
- … 21 more at https://npm.io/package/cola-script/versions

## README

![logo](https://raw.githubusercontent.com/TrigenSoftware/ColaScript/master/colalogo.png)

ColaScript is the language that compiles into JavaScript. This language is similar to Dart, CoffeeScript, Python, Go and PHP, with some original ideas. Compiler based on [UglifyJS2](https://github.com/mishoo/UglifyJS2). You can try ColaScript [here (stable)](http://cola.trigen.pro) or [here (dev)](http://cola.trigen.pro/dev/). [Learn more about ColaScript](https://github.com/TrigenSoftware/ColaScript/wiki/A-Tour-of-the-ColaScript).

## Installation

Firstly, make sure you have installed the latest version of [node.js](http://nodejs.org/)
(You may need to restart your computer after this step).

From NPM for use as a command line app:

```
$ npm install cola-script -g
```

From NPM for programmatic use:

```
$ npm install cola-script
```

From Bower for using in browser:

```
$ bower install cola-script
```

From Git:

```
$ git clone git://github.com/TrigenSoftware/ColaScript.git
$ cd ColaScript
$ npm link .
```

## Usage
    
Use it same as in [UglifyJS2](https://github.com/mishoo/UglifyJS2), except:

```
-j, --js, --javascript        Work with JavaScript (by default Cola will
                              expect ColaScript).                    [boolean]
-n, --node                    Enable compilation for node.           [boolean]
-P, --packages                Path to packages.json (packages.json by
                              default).                               [string]
-i, --ignore-main-wrapping    Ignore `main` wrapping.                [boolean]
--browser-cola                Build itself (Cola) for running Cola in browser.
                                                                     [boolean]
```
       
Simple example of usage:

```
$ cola main.cola -o main.min.js -m -c
```
    
## In browser

During developing is more comfortable to compile the code directly in your browser, for that add `browser-cola.js` to `your.html` code:

```html
<script src="path/to/browser-cola.js"></script>
```
	
Now you can run your Cola-Code:

```html
<script type="text/colascript" src="path/to/your.cola"></script>
```
	
If `your.cola` depends on other scripts in `your.html`, it's better to notice `browser-cola` about it:

```html
<script type="text/colascript" src="angular.min.js"></script>
<script type="text/colascript" src="path/to/your.cola"></script>
```

---
_Source: https://npm.io/package/cola-script · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
