CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-coffeescript

tessl install tessl/npm-coffeescript@2.7.0

A programming language that compiles into JavaScript, offering more concise and readable syntax while maintaining full JavaScript compatibility.

Agent Success

Agent success rate when using this tile

77%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.01x

Baseline

Agent success rate without this tile

76%

task.mdevals/scenario-4/

Module Loader Utility

A utility that compiles and loads CoffeeScript modules with ES6 import/export syntax support.

Capabilities

Compile modules with ES6 imports

Compile CoffeeScript code containing ES6 import statements into JavaScript that preserves the import syntax.

  • Given CoffeeScript code import { add } from './math', the compiled output contains a valid ES6 import statement @test
  • Given CoffeeScript code with default import import Calculator from './calc', the compiled output contains the correct default import @test

Compile modules with ES6 exports

Compile CoffeeScript code containing ES6 export statements into JavaScript that preserves the export syntax.

  • Given CoffeeScript code export add = (a, b) -> a + b, the compiled output contains a valid named export @test
  • Given CoffeeScript code with default export export default class Calculator, the compiled output contains the correct default export @test

Automatic bare mode activation

When compiling modules with import or export statements, the compiler automatically activates bare mode (no function wrapper).

  • Given CoffeeScript code with an export statement, the compiled output does not have a top-level function wrapper @test

Implementation

@generates

API

# Compiles CoffeeScript code and returns JavaScript output
# @param {String} code - The CoffeeScript source code to compile
# @return {String} The compiled JavaScript code
export compileModule = (code) ->

# Checks if compiled code is in bare mode (no wrapper function)
# @param {String} code - The CoffeeScript source code
# @return {Boolean} True if the compiled output is in bare mode
export isBareMode = (code) ->

Dependencies { .dependencies }

coffeescript { .dependency }

Provides CoffeeScript compilation with ES6 module support.

@satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/coffeescript@2.7.x
tile.json