tessl install tessl/npm-coffeescript@2.7.0A 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%
Build a dynamic configuration loader that executes CoffeeScript configuration files at runtime and evaluates configuration expressions in a sandboxed environment.
Create a configuration loader with the following capabilities:
Implement a function that loads and executes CoffeeScript configuration files. The configuration files should:
Implement a function that evaluates CoffeeScript expressions in a controlled sandbox environment. The evaluator should:
Both functions should handle errors appropriately:
@generates
/**
* Loads and executes a CoffeeScript configuration file
* @param {string} filepath - Path to the CoffeeScript file
* @returns {any} The exported value from the configuration file
* @throws {Error} If file cannot be loaded or contains invalid syntax
*/
function loadConfig(filepath) {
// Implementation here
}
/**
* Evaluates a CoffeeScript expression in a sandboxed environment
* @param {string} expression - CoffeeScript expression to evaluate
* @param {Object} context - Context object with variables to make available
* @returns {any} Result of the evaluated expression
* @throws {Error} If expression contains invalid syntax or runtime errors occur
*/
function evalExpression(expression, context) {
// Implementation here
}
module.exports = {
loadConfig,
evalExpression
};Provides CoffeeScript compilation and execution capabilities.