JCoffeeScript

JCoffeeScript is a java library that compiles CoffeeScript 1.0.

License

License

Categories

Categories

Maven Build Tools
GroupId

GroupId

com.google.code.maven-play-plugin.com.github.yeungda.jcoffeescript
ArtifactId

ArtifactId

jcoffeescript
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

JCoffeeScript
JCoffeeScript is a java library that compiles CoffeeScript 1.0.
Project URL

Project URL

https://github.com/yeungda/jcoffeescript
Source Code Management

Source Code Management

https://github.com/yeungda/jcoffeescript

Download jcoffeescript

How to add to project

<!-- https://jarcasting.com/artifacts/com.google.code.maven-play-plugin.com.github.yeungda.jcoffeescript/jcoffeescript/ -->
<dependency>
    <groupId>com.google.code.maven-play-plugin.com.github.yeungda.jcoffeescript</groupId>
    <artifactId>jcoffeescript</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.google.code.maven-play-plugin.com.github.yeungda.jcoffeescript/jcoffeescript/
implementation 'com.google.code.maven-play-plugin.com.github.yeungda.jcoffeescript:jcoffeescript:1.0'
// https://jarcasting.com/artifacts/com.google.code.maven-play-plugin.com.github.yeungda.jcoffeescript/jcoffeescript/
implementation ("com.google.code.maven-play-plugin.com.github.yeungda.jcoffeescript:jcoffeescript:1.0")
'com.google.code.maven-play-plugin.com.github.yeungda.jcoffeescript:jcoffeescript:jar:1.0'
<dependency org="com.google.code.maven-play-plugin.com.github.yeungda.jcoffeescript" name="jcoffeescript" rev="1.0">
  <artifact name="jcoffeescript" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.google.code.maven-play-plugin.com.github.yeungda.jcoffeescript', module='jcoffeescript', version='1.0')
)
libraryDependencies += "com.google.code.maven-play-plugin.com.github.yeungda.jcoffeescript" % "jcoffeescript" % "1.0"
[com.google.code.maven-play-plugin.com.github.yeungda.jcoffeescript/jcoffeescript "1.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

JCoffeeScript

JCoffeeScript is a java library that compiles CoffeeScript 1.1.

Usage

from the command prompt:

echo "a = 1" | java -jar jcoffeescript-1.1.jar

      (function() {
          var a;
          a = 1;
       })();

####Command Line (unix/windows):

java -jar jcoffeescript-1.1.jar < foo.coffee > foo.js

####command line options:

--bare - compile the javascript without top-level function safety wrapper.

####From java:

String javascript = new org.jcoffeescript.JCoffeeScriptCompiler().compile("a = 1");

####From jruby:

if "java" == RUBY_PLATFORM then
   # use jcoffeescript implementation
   require 'java'
   class CoffeeScriptCompiler
        def initialize
            @compiler = org.jcoffeescript.JCoffeeScriptCompiler.new
        end
        def compile(source)
            @compiler.compile(source)
        end
    end
else
    # use shell out to coffee implementation
    require 'open3'
    class CoffeeScriptCompiler
        def compile(source)
            return Open3.popen3('coffee --eval --print') do |stdin, stdout, stderr|
              stdin.puts source
              stdin.close
              stdout.read
            end
        end
    end
end
compiler = CoffeeScriptCompiler.new
compiler.compile('a = 1')
#### Thanks Thanks to Jeremy Ashkenas and all contributors to the coffeescript project. Thanks to Raphael Speyer for helping with the design. Thanks to Daniel Cassidy for putting a lot of work into the code. Thanks to PandaWood for maintaining the code. [JCoffeeScript Homepage](http://yeungda.github.com/jcoffeescript)

Versions

Version
1.0