Registry / devops / es6-module-transpiler-yui-formatter

es6-module-transpiler-yui-formatter

JSON →
library0.3.0jsnpmunverified

A plugin formatter for es6-module-transpiler that compiles ES6 module syntax into YUI.add() format. Version 0.3.0 is the latest stable release. This formatter allows developers to write ES6 modules and transpile them for use in YUI applications. It is maintained as part of the es6-module-transpiler ecosystem and sacrifices some ES6 features (like live bindings) to work with YUI's mutable namespace. Designed for build tool integration via CLI or programmatic API. Deprecated in favor of modern bundlers; no updates since 2015.

npm install es6-module-transpiler-yui-formatter
INSTALL
IMPORT
SIG · ES6-MODULE-TRANSPI
E
es6-module-transpiler-yui-formatter
devopsjavascriptv0.3.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.

YUIFormatter
var YUIFormatter = require('es6-module-transpiler-yui-formatter');
var YUIFormatter = require('yui-formatter');
CommonJS require is the standard way; no default ESM export.
Container
var Container = require('es6-module-transpiler').Container;
var Container = require('es6-module-transpiler-yui-formatter').Container;
Container is provided by the main transpiler package, not the formatter.
FileResolver
var FileResolver = require('es6-module-transpiler').FileResolver;
var FileResolver = require('es6-module-transpiler-yui-formatter').FileResolver;
FileResolver is from the transpiler package.

Demonstrates programmatic usage of the YUI formatter with es6-module-transpiler: create container, set resolver and formatter, compile module, write output.

var transpiler = require('es6-module-transpiler'); var YUIFormatter = require('es6-module-transpiler-yui-formatter'); var Container = transpiler.Container; var FileResolver = transpiler.FileResolver; var container = new Container({ resolvers: [new FileResolver(['lib/'])], formatter: new YUIFormatter() }); container.getModule('index'); container.write('out/mylib.js');
Debug
Known issues
deprecatedThis package is deprecated. It has not been updated since 2015 and relies on an abandoned transpiler. Modern projects should use Babel or TypeScript.
fix
Migrate to a modern module transpiler like Babel or TypeScript and output UMD or ES modules.
affects: >=0.0.1
breakingLive bindings are not supported. ES6 module live bindings are compiled to static exports, which may lead to unexpected behavior with exported values that are reassigned after import.
fix
Avoid relying on live bindings. Re-export values explicitly if needed.
affects: >=0.0.1
gotchaRequires es6-module-transpiler version 0.10.x to work. Using newer or older versions may cause compatibility issues.
fix
Ensure es6-module-transpiler is pinned to 0.10.x in package.json.
affects: >=0.3.0
deprecatedThe CLI tool 'compile-modules' is no longer maintained and may not install correctly.
fix
Use programmatic API or switch to a different build tool.
affects: >=0.0.1
gotchaDefault exports are compiled into a single __es6_export__ call, but the original function is not hoisted. This may cause ordering issues if the default export function is referenced before the YUI.add() callback.
fix
Ensure imports of default exports occur after the module is loaded or use named exports instead.
affects: >=0.1.0
Errors
Common errors & fixes
Error: Cannot find module 'es6-module-transpiler-yui-formatter'
The package is not installed or is installed globally but not locally.
fix
Run 'npm install es6-module-transpiler-yui-formatter --save-dev' in your project directory.
TypeError: YUIFormatter is not a constructor
The require returns the module, but the formatter is the module itself, not a property.
fix
Use: var YUIFormatter = require('es6-module-transpiler-yui-formatter');
SyntaxError: Unexpected token export
The code uses ES6 module syntax but the transpiler/formatter is not set up correctly.
fix
Ensure es6-module-transpiler is installed and configured with the YUI formatter.
Upgrade
Version history
0.3.0latest on npm
Audit
Dependencies
es6-module-transpilerrequiredRequired runtime dependency; the formatter is a plugin for the transpiler
Agent activity
2 hits · last 30 days
node
2
Resources
es6-module-transpiler-yui-formatter — npm install es6-module-transpiler-yui-formatter · libregistry