Current section
4 Versions
Jump to
Current section
4 Versions
Compare versions
5
files changed
+34
additions
-10
deletions
| @@ -0,0 +1,20 @@ | |
| 1 | + The MIT License (MIT) |
| 2 | + |
| 3 | + Copyright (c) 2013 Akash Manohar J |
| 4 | + |
| 5 | + Permission is hereby granted, free of charge, to any person obtaining a copy of |
| 6 | + this software and associated documentation files (the "Software"), to deal in |
| 7 | + the Software without restriction, including without limitation the rights to |
| 8 | + use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of |
| 9 | + the Software, and to permit persons to whom the Software is furnished to do so, |
| 10 | + subject to the following conditions: |
| 11 | + |
| 12 | + The above copyright notice and this permission notice shall be included in all |
| 13 | + copies or substantial portions of the Software. |
| 14 | + |
| 15 | + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 16 | + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS |
| 17 | + FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR |
| 18 | + COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER |
| 19 | + IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN |
| 20 | + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| @@ -21,8 +21,8 @@ import Rotor.BasicRotors | |
| 21 21 | import CoffeeRotor |
| 22 22 | |
| 23 23 | output_path = "priv/static/assets/app.js" |
| 24 | - Rotor.add_group :coffeescripts, ["priv/assets/javascripts/*.coffee"], fn(files)-> |
| 25 | - read_files(files) |
| 24 | + Rotor.watch :coffeescripts, ["priv/assets/javascripts/*.coffee"], fn(_changed_files, all_files)-> |
| 25 | + read_files(all_files) |
| 26 26 | |> coffee |
| 27 27 | |> concat |
| 28 28 | |> output_to(output_path) |
| @@ -3,8 +3,11 @@ | |
| 3 3 | {<<"contributors">>,[<<"Akash Manohar J">>]}. |
| 4 4 | {<<"description">>, |
| 5 5 | <<"A [rotor](https://github.com/HashNuke/rotor) to compile CoffeeScript files\n">>}. |
| 6 | - {<<"files">>,[<<"lib/coffee_rotor.ex">>,<<"mix.exs">>,<<"README.md">>]}. |
| 6 | + {<<"elixir">>,<<">= 1.0.0">>}. |
| 7 | + {<<"files">>, |
| 8 | + [<<"lib/coffee_rotor.ex">>,<<"mix.exs">>,<<"README.md">>,<<"LICENSE">>]}. |
| 9 | + {<<"licenses">>,[<<"MIT">>]}. |
| 7 10 | {<<"links">>,#{<<"GitHub">> => <<"https://github.com/HashNuke/coffee_rotor">>}}. |
| 8 11 | {<<"requirements">>, |
| 9 | - #{<<"rotor">> => #{<<"optional">> => nil,<<"requirement">> => <<"~> 0.1.5">>}}}. |
| 10 | - {<<"version">>,<<"0.1.2">>}. |
| 12 | + #{<<"rotor">> => #{<<"optional">> => nil,<<"requirement">> => <<"~> 0.2.2">>}}}. |
| 13 | + {<<"version">>,<<"0.2.1">>}. |
| @@ -1,7 +1,7 @@ | |
| 1 1 | defmodule CoffeeRotor do |
| 2 2 | |
| 3 3 | def coffee(files) do |
| 4 | - {ok, js} = :js_driver.new() |
| 4 | + {:ok, js} = :js_driver.new() |
| 5 5 | {:ok, coffee_compiler} = File.read "vendor/coffee-script.js" |
| 6 6 | :ok = :js.define(js, coffee_compiler) |
| @@ -3,8 +3,8 @@ defmodule CoffeeRotor.Mixfile do | |
| 3 3 | |
| 4 4 | def project do |
| 5 5 | [app: :coffee_rotor, |
| 6 | - version: "0.1.2", |
| 7 | - elixir: "~> 0.13.3", |
| 6 | + version: "0.2.1", |
| 7 | + elixir: ">= 1.0.0", |
| 8 8 | description: description, |
| 9 9 | package: package, |
| 10 10 | deps: deps] |
| @@ -13,7 +13,7 @@ defmodule CoffeeRotor.Mixfile do | |
| 13 13 | |
| 14 14 | def application do |
| 15 15 | [ |
| 16 | - applications: [:rotor, :erlang_js], |
| 16 | + applications: [:sasl, :rotor, :erlang_js], |
| 17 17 | mod: [] |
| 18 18 | ] |
| 19 19 | end |
| @@ -29,6 +29,7 @@ defmodule CoffeeRotor.Mixfile do | |
| 29 29 | defp package do |
| 30 30 | [ |
| 31 31 | contributors: ["Akash Manohar J"], |
| 32 | + licenses: ["MIT"], |
| 32 33 | links: %{ "GitHub" => "https://github.com/HashNuke/coffee_rotor" } |
| 33 34 | ] |
| 34 35 | end |
| @@ -36,7 +37,7 @@ defmodule CoffeeRotor.Mixfile do | |
| 36 37 | |
| 37 38 | defp deps do |
| 38 39 | [ |
| 39 | - {:rotor, "~> 0.1.5"}, |
| 40 | + {:rotor, "~> 0.2.2"}, |
| 40 41 | {:erlang_js, github: "basho/erlang_js", tag: "1.3.0"} |
| 41 42 | ] |
| 42 43 | end |