Registry / devops / mimosa-es6-module-transpiler

mimosa-es6-module-transpiler

JSON →
library0.6.0jsnpmunverified

An ES6 module transpiler plugin for the Mimosa build tool, version 0.6.0 (stable, no recent updates). It transpiles ES6 module syntax to AMD, CommonJS, or global module formats, wrapping square's es6-module-transpiler. Key differentiators: tight integration with Mimosa, support for CoffeeScript backtick escaping, and exclusion patterns for vendor files. However, it does not support source maps, has limited ES6 syntax coverage, and depends on an outdated transpiler that may not reflect current spec.

npm install mimosa-es6-module-transpiler
INSTALL
IMPORT
SIG · MIMOSA-ES6-MODULE-
M
mimosa-es6-module-transpiler
devopsjavascriptv0.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Default
import es6Transpiler from 'mimosa-es6-module-transpiler'
const es6Transpiler = require('mimosa-es6-module-transpiler')
This package is a Mimosa plugin and not typically imported directly. It is registered via Mimosa's module system.
registration
// In mimosa-config: modules: ['es6-module-transpiler']
require('mimosa-es6-module-transpiler').register()
Do not call register manually; Mimosa handles plugin registration.

Shows how to install, configure, and use the plugin to transpile ES6 modules to AMD.

// Install Mimosa (if not already) npm install -g mimosa // Create a project and add config // In mimosa-config.coffee: modules: ['es6-module-transpiler'] es6Modules: type:'amd' inferName:true exclude: [/[/\\]vendor[/\\]/, /[/\\]main[\.-]/, /-main.js$/, /[/\\]common.js$/] globals:{} // Write a file with ES6 module syntax, e.g., app.js: import $ from 'jquery'; export default function() { return $('body'); }; // Run Mimosa to build mimosa build
Debug
Known issues
breakingDoes not support source maps; existing source maps will be invalid.
fix
Do not rely on source maps with this plugin. Consider alternative transpilers like Babel.
affects: >=0.1
deprecatedThe ES6 spec has evolved; this transpiler may not support current syntax (e.g., default exports).
fix
Switch to Babel or TypeScript for modern ES6+ module support.
affects: >=0.1
gotchaCoffeeScript backtick required for ES6 syntax to survive CoffeeScript compilation.
fix
Use backticks around import/export statements in .coffee files.
affects: >=0.1
gotchaExclude regex patterns may accidentally include desired files if not careful.
fix
Review the exclude list and customize as needed for your project structure.
affects: >=0.1
Errors
Common errors & fixes
Error: Cannot find module 'es6-module-transpiler'
Missing dependency es6-module-transpiler
fix
Run npm install es6-module-transpiler in your project directory.
TypeError: Cannot read property 'amd' of undefined
The config option es6Modules.type is misspelled or not set
fix
Ensure es6Modules.type is one of 'amd', 'common', or 'globals'.
Upgrade
Version history
0.6.0latest on npm
Audit
Dependencies
es6-module-transpilerrequiredcore transpilation library
Agent activity
4 hits · last 30 days
node
4
Resources
mimosa-es6-module-transpiler — npm install mimosa-es6-module-transpiler · libregistry