Description Usage Arguments Examples
Compiles coffee script into JavaScript.
1 | coffee_compile(code, ...)
|
code |
a string with JavaScript code |
... |
additional options passed to the compiler |
1 2 3 4 5 6 7 8 9 | # Hello world
coffee_compile("square = (x) -> x * x")
coffee_compile("square = (x) -> x * x", bare = TRUE)
# Simple script
demo <- readLines(system.file("example/demo.coffee", package = "js"))
js <- coffee_compile(demo)
cat(js)
cat(uglify_optimize(js))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.