1 | ## What's this?
|
2 | A plugin that enables [ASPAX](http://aspax.github.io) to handle [CoffeeScript](http://coffeescript.org) files.
|
3 |
|
4 | ## Installation
|
5 | Type this in the folder where you're running ASPAX:
|
6 |
|
7 | npm install aspax-coffee-handler
|
8 |
|
9 | If you're running ASPAX in a Node.js application root folder, consider using the `--save-dev` option to avoid deploying this plugin to your production environment:
|
10 |
|
11 | npm install aspax-coffee-handler --save-dev
|
12 |
|
13 | ## Usage
|
14 | Simply add `.coffee` source files in `aspax.yml`:
|
15 |
|
16 | app.js:
|
17 | - lib.js
|
18 | - script-1.coffee|bare
|
19 | - script-2.coffee
|
20 |
|
21 | ## Available flags
|
22 |
|
23 | - `bare`: compile without the top-level function safety wrapper - see more [here](http://coffeescript.org/#usage).
|
24 |
|
25 | Basically, this:
|
26 |
|
27 | $ -> console.log 'hi!'
|
28 |
|
29 | ...compiles to this **with** the `bare` flag:
|
30 |
|
31 | $(function() {
|
32 | return console.log("hi!");
|
33 | });
|
34 |
|
35 | ...and to this **without** the flag:
|
36 |
|
37 | (function() {
|
38 | $(function() {
|
39 | return console.log("hi!");
|
40 | });
|
41 | }).call(this);
|
42 |
|
43 | ## Endorsing the author
|
44 | If you find this piece of software useful, please [![endorse](https://api.coderwall.com/icflorescu/endorsecount.png)](https://coderwall.com/icflorescu) me on Coderwall!
|