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

CoffeeScript Compiler Utility

A command-line utility that compiles CoffeeScript source files to JavaScript with various output options.

Capabilities

Basic Compilation

The utility should read a CoffeeScript source file and compile it to JavaScript.

  • Given a source file containing valid CoffeeScript code, the utility compiles it to JavaScript and writes the output to a specified file @test
  • When compilation succeeds, the utility exits with status code 0 @test

Bare Mode Compilation

The utility should support bare mode compilation that omits the top-level function wrapper.

  • When the bare mode option is provided, the compiled JavaScript does not include a function wrapper @test
  • Bare mode is useful for compiling code that will be used as Node.js modules @test

Source Map Generation

The utility should be able to generate source maps alongside the compiled JavaScript.

  • When source map generation is enabled, a source map file is created with the .map extension @test
  • The generated JavaScript file includes a sourceMappingURL comment pointing to the map file @test

Error Handling

The utility should handle compilation errors gracefully.

  • When the source file contains invalid CoffeeScript syntax, the utility displays an error message and exits with a non-zero status code @test
  • Error messages include the filename and location information when available @test

Implementation

@generates

API

/**
 * Compiles a CoffeeScript file to JavaScript
 * @param {string} inputPath - Path to the CoffeeScript source file
 * @param {string} outputPath - Path where the JavaScript output should be written
 * @param {Object} options - Compilation options
 * @param {boolean} options.bare - Compile without top-level function wrapper
 * @param {boolean} options.sourceMap - Generate source map file
 * @returns {Promise<void>}
 */
async function compileFile(inputPath, outputPath, options = {}) {
  // Implementation here
}

/**
 * Main CLI entry point
 * @param {string[]} args - Command-line arguments
 * @returns {Promise<number>} Exit code (0 for success, non-zero for failure)
 */
async function main(args) {
  // Implementation here
}

module.exports = { compileFile, main };

CLI Usage

# Basic compilation
node src/compiler.js input.coffee output.js

# Bare mode compilation
node src/compiler.js input.coffee output.js --bare

# With source map generation
node src/compiler.js input.coffee output.js --map

# Combined options
node src/compiler.js input.coffee output.js --bare --map

Dependencies { .dependencies }

coffeescript { .dependency }

Provides CoffeeScript to JavaScript compilation support.

Version

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