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-5/

CoffeeScript File Compiler

A utility that compiles CoffeeScript files from the filesystem with proper error handling and format detection.

Capabilities

File Compilation

  • Compiles a regular CoffeeScript file (.coffee) from the filesystem and returns JavaScript code @test
  • Compiles a literate CoffeeScript file (.litcoffee) from the filesystem and returns JavaScript code @test
  • Returns JavaScript code when compiling a file with BOM (Byte Order Mark) at the beginning @test

Error Handling

  • Throws an error with filename information when attempting to compile a file with syntax errors @test
  • Throws an error when attempting to compile a non-existent file @test

Implementation

@generates

API

/**
 * Compiles a CoffeeScript file from the filesystem.
 *
 * @param {string} filepath - The path to the CoffeeScript file to compile.
 * @param {Object} [options] - Compilation options (e.g., bare mode, source maps).
 * @returns {string} The compiled JavaScript code.
 * @throws {Error} Throws an error if the file cannot be read or contains syntax errors.
 */
function compileFile(filepath, options) {
  // IMPLEMENTATION HERE
}

module.exports = {
  compileFile
};

Dependencies { .dependencies }

coffeescript { .dependency }

Provides CoffeeScript compilation support.

@satisfied-by

Version

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