Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/shinnn/broccoli-livescript

A Broccoli plugin to compile LiveScript
https://github.com/shinnn/broccoli-livescript

Last synced: 27 days ago
JSON representation

A Broccoli plugin to compile LiveScript

Awesome Lists containing this project

README

        

# broccoli-livescript

[![npm version](https://img.shields.io/npm/v/broccoli-livescript.svg)](https://www.npmjs.com/package/broccoli-livescript)
[![Build Status](https://travis-ci.com/shinnn/broccoli-livescript.svg?branch=master)](https://travis-ci.com/shinnn/broccoli-livescript)
[![Coverage Status](https://img.shields.io/coveralls/shinnn/broccoli-livescript.svg)](https://coveralls.io/github/shinnn/broccoli-livescript)

A [Broccoli](https://github.com/broccolijs/broccoli) plugin to compile [LiveScript](https://livescript.net/)

## Installation

[Use](https://docs.npmjs.com/cli/install) [npm](https://docs.npmjs.com/about-npm/).

```
npm install --save-dev broccoli-livescript
```

## API

```javascript
const liveScript = require('broccoli-livescript');
```

### liveScript(*tree* [, *options*])

*tree*: `string` or `Object` (broccoli tree)
*options*: `Object` (directly passed to [LiveScript options](https://github.com/gkz/LiveScript/blob/1.6.0/src/index.ls#L35))
Return: `Function`

#### options.bare

Type: `boolean`
Default: `false`

Compile without the top-level function wrapper.

#### options.header

Type: `boolean`
Default: `true`

`false` removes `"Generated by"` header.

```javascript
//Brocfile.js
const liveScript = require('broccoli-livescript');

module.exports = liveScript('scripts', {
bare: true,
header: false
});
```

## License

Copyright (c) 2014 - 2018 [Shinnosuke Watanabe](https://github.com/shinnn)

Licensed under [the MIT LIcense](./LICENSE).