{"id":26934,"library":"es6-module-transpiler-coffee-brunch","title":"es6-module-transpiler-coffee-brunch","description":"Brunch plugin that compiles CoffeeScript files through coffee-script and then Square's es6-module-transpiler to produce AMD or CommonJS modules with ES6 module syntax (import/export). Version 0.1.0 is the latest and only release. This plugin is a stop-gap alternative to ember-cli for ES6 module transpiling in CoffeeScript codebases using Brunch. It is effectively limited to AMD output due to CommonJS interoperability issues. Requires manual backtick escaping of ES6 syntax in CoffeeScript.","status":"maintenance","version":"0.1.0","language":"javascript","source_language":"en","source_url":"https://github.com/ahacking/es6-module-transpiler-coffee-brunch","tags":["javascript","es6","transpiler","brunch"],"install":[{"cmd":"npm install es6-module-transpiler-coffee-brunch","lang":"bash","label":"npm"},{"cmd":"yarn add es6-module-transpiler-coffee-brunch","lang":"bash","label":"yarn"},{"cmd":"pnpm add es6-module-transpiler-coffee-brunch","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Compiles CoffeeScript files before ES6 module transpilation","package":"coffee-script","optional":false},{"reason":"Performs ES6 module transpilation to AMD/CJS","package":"es6-module-transpiler","optional":false},{"reason":"Required as build tool; plugin is designed for Brunch ecosystem","package":"brunch","optional":false}],"imports":[{"note":"This package is CJS-only. No ES module exports.","wrong":"import ES6ModuleTranspilerCoffeeBrunchPlugin from 'es6-module-transpiler-coffee-brunch';","symbol":"ES6ModuleTranspilerCoffeeBrunchPlugin","correct":"const ES6ModuleTranspilerCoffeeBrunchPlugin = require('es6-module-transpiler-coffee-brunch');"},{"note":"CoffeeScript cannot parse ES6 syntax; must use backticks to escape.","wrong":"import Animal from 'animal' (without backticks)","symbol":"export default / import","correct":"`import Animal from 'animal';` ... `export default Snake;`"},{"note":"Configuration key uses camelCase 'es6ModuleTranspiler' as per plugin code.","wrong":"plugins.es6_module_transpiler","symbol":"Configuration","correct":"plugins.es6ModuleTranspiler.wrapper = 'amd' in config.coffee/brunch config"}],"quickstart":{"code":"// In config.coffee\nexports.config =\n  modules:\n    wrapper: false # Disable brunch's module wrapper\n  plugins:\n    es6ModuleTranspiler:\n      wrapper: 'amd'  # or 'cjs'\n      moduleName: (path) -> 'myapp/' + path\n      options:\n        imports:\n          underscore: '_'\n        global: 'MyApp'\n\n// In app/snake.coffee\n`import Animal from 'animal';`\n\nclass Snake extends Animal\n  move: ->\n    alert \"Slithering...\"\n    super 5\n\n`export default Snake;`\n","lang":"coffeescript","description":"Shows configuration with brunch module wrapper disabled, transpiler set to AMD, and a CoffeeScript file using backtick-escaped ES6 import/export."},"warnings":[{"fix":"Use backticks around import/export statements as shown in README.","message":"ES6 module syntax must be escaped with backticks in CoffeeScript files.","severity":"gotcha","affected_versions":"all"},{"fix":"Set wrapper to 'amd' in configuration.","message":"CommonJS output may not work correctly; recommended to use AMD wrapper.","severity":"gotcha","affected_versions":"all"},{"fix":"Remove coffee-script-brunch from package.json and run npm prune.","message":"Do not use coffee-script-brunch simultaneously; this plugin replaces it.","severity":"gotcha","affected_versions":"all"},{"fix":"Set modules.wrapper: false in brunch config.","message":"Brunch's module wrapper must be disabled when using AMD wrapper.","severity":"gotcha","affected_versions":"all"},{"fix":"Use camelCase key: es6ModuleTranspiler in the plugins section.","message":"Configuration key must be plugins.es6ModuleTranspiler (not es6_module_transpiler).","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: npm install es6-module-transpiler","cause":"Missing required dependency es6-module-transpiler.","error":"Error: Cannot find module 'es6-module-transpiler'"},{"fix":"Ensure CoffeeScript files are under a directory named 'app' or configure brunch's paths accordingly.","cause":"Brunch expects source files under 'app' directory; plugin may not find files if directory structure is different.","error":"Error: ENOTDIR: not a directory, scandir '/path/to/app'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}