# ember-cli-coffeescript

> Adds precompilation of CoffeeScript files and all the basic generation types to the `ember generate` command.

Latest version **1.16.1** (published 2017-03-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install ember-cli-coffeescript
pnpm add ember-cli-coffeescript
yarn add ember-cli-coffeescript
bun add ember-cli-coffeescript
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.16.1 |
| Published | 2017-03-26 |
| First published | 2014-07-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >= 0.10.0 |
| Dependencies | 12 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 72 |
| Author | Kim Røen |
| Maintainers | kimroen |
| Keywords | ember-addon, coffeescript, blueprints |

## Links

- npm: https://www.npmjs.com/package/ember-cli-coffeescript
- Repository: https://github.com/kimroen/ember-cli-coffeescript
- Issues: https://github.com/kimroen/ember-cli-coffeescript/issues
- npm.io page: https://npm.io/package/ember-cli-coffeescript

## Dependencies (12)

- [chalk](https://npm.io/package/chalk.md) ^1.0.0
- [ignore](https://npm.io/package/ignore.md) ^3.0.9
- [fs-extra](https://npm.io/package/fs-extra.md) ^0.11.1
- [coffeelint](https://npm.io/package/coffeelint.md) ^1.6.1
- [inflection](https://npm.io/package/inflection.md) ^1.4.0
- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.0
- [broccoli-coffee](https://npm.io/package/broccoli-coffee.md) ~0.8.0
- [lodash.defaults](https://npm.io/package/lodash.defaults.md) ^4.2.0
- [json-stable-stringify](https://npm.io/package/json-stable-stringify.md) ^1.0.0
- [ember-cli-version-checker](https://npm.io/package/ember-cli-version-checker.md) ^1.0.1
- [broccoli-persistent-filter](https://npm.io/package/broccoli-persistent-filter.md) ^1.1.0
- [ember-cli-legacy-blueprints](https://npm.io/package/ember-cli-legacy-blueprints.md) ^0.1.1

## Recent versions

- 1.16.1 (latest) — 2017-03-26
- 1.16.0 — 2017-02-06
- 1.15.0 — 2016-10-03
- 1.14.0 — 2016-06-05
- 1.13.2 — 2015-11-22
- 1.13.1 — 2015-09-19
- 1.13.0 — 2015-08-06
- 0.11.0 — 2015-05-03
- 0.10.0 — 2015-03-13
- 0.9.1 — 2015-02-15
- 0.9.0 — 2015-02-12
- 0.8.1 — 2015-02-04
- 0.8.0 — 2015-01-31
- 0.7.0 — 2015-01-08
- 0.6.0 — 2014-12-08
- … 15 more at https://npm.io/package/ember-cli-coffeescript/versions

## README

# CoffeeScript support for ember-cli [![Build Status](https://travis-ci.org/kimroen/ember-cli-coffeescript.svg?branch=master)](https://travis-ci.org/kimroen/ember-cli-coffeescript)
Adds precompilation of CoffeeScript files and all the basic generation
types to the `ember generate` command, as well as linting.

### Includes
- Generating files in CoffeeScript with `ember generate`
- Preprocessing CoffeeScript-files in your app, including tests
- Linting your CoffeeScript-files.

### Install
```
ember install ember-cli-coffeescript
```

**NB**: ember-cli-coffeescript is tested using ember-cli version `2.3.0` and up. Some of it probably works on
earlier versions, but I wouldn't know.

### How to use

#### Blueprints
Run `ember help generate` to get a list of available blueprints. Use them by running `ember g <blueprint> <args>`. For instance, to generate a component:

```
ember g component my-component
```

ember-cli-coffeescript comes with pod-support for the same blueprints as ember-cli
does. Check out [the ember-cli docs for pods](https://ember-cli.com/user-guide/#using-pods)
for instructions on how to use it.

If you'd like to use ember-cli-coffeescript without the blueprints, you can add
the following to your `config/environment.js`:

```js
ENV.coffeeOptions = {
  blueprints: false
}
```

This will make it fall back to the next blueprints in line (probably the ones
from ember-cli).

#### Precompiling
This will happen automatically - no work necessary.

#### Linting
If you have a `coffeelint.json` file in the root of you project we will automatically pick up on it and start running linting on files when using the `ember build` and `ember serve` commands.
If you do not want linting to run despite having a `coffeelint.json` file, use the following configuration
in your `config/environment.js`.

```js
ENV.coffeeOptions = {
  lint: false
}
```

You can set `lint` to `true` to enable linting with the default configurations even without a custom `coffeelint.json` file.

You can find all the [available options on the website for `coffeelint`](http://www.coffeelint.org/#options).

If you want to specify a different path for your `coffeelint.json` file you can specify the path
(relative to the project directory or absolute)

```js
ENV.coffeeOptions = {
  lint: {
    configPath: "configurations/coffeelint.json"
  }
}
```

If you want to change the way we format the linting output you can specify custom error output and stats output functions:

```js
ENV.coffeeOptions = {
  lint: {
    formatter: function(filePath, lintResults) {  },
    statsFormatter: function(stats) { console.log('Files: ', stats.fileCount, "Errors: ", stats.errorCount) }
  }
}
```

**NOTE:** The lint results will show up twice when you build and run your app; once
for the app files, and then once for the test files. On rebuild, only the changed
files are linted.

##### Lintignore
To avoid linting specific files or folders, you can put a file named `.coffeelintignore`
in the root of your project containing ignore-rules, one per line. This is just like a
`.gitignore`-file, and it will follow the same rules.

### Developing
- `git clone` this repository
- `npm install`
- `bower install`
- `npm link`

Because of the nature of this project, it needs to be consumed by an ember-cli project to be properly developed.

- Add `"ember-cli-coffeescript": "*"` to your consuming project's `package.json`
- From your project root run `npm link ember-cli-coffeescript`

### Running Tests
- `ember test`
- `npm run embertest`
- `npm run nodetest`

To run all the tests:

- `npm test`

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