New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cola-script

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cola-script

ColaScript translator / parser / mangler / compressor / beautifier toolkit

  • 0.8.24
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
decreased by-47.37%
Maintainers
1
Weekly downloads
 
Created
Source

logo

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. You can try ColaScript here (stable) or here (dev). Learn more about ColaScript.

Installation

Firstly, make sure you have installed the latest version of node.js (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, 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:

<script src="path/to/browser-cola.js"></script>

Now you can run your Cola-Code:

<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:

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

Keywords

FAQs

Package last updated on 03 Feb 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc