{"id":25250,"library":"es6-module-transpiler-yui-formatter","title":"es6-module-transpiler YUI Formatter","description":"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.","status":"deprecated","version":"0.3.0","language":"javascript","source_language":"en","source_url":"https://github.com/caridy/es6-module-transpiler-yui-formatter","tags":["javascript","es6","module","transpiler","yui","module-formatter"],"install":[{"cmd":"npm install es6-module-transpiler-yui-formatter","lang":"bash","label":"npm"},{"cmd":"yarn add es6-module-transpiler-yui-formatter","lang":"bash","label":"yarn"},{"cmd":"pnpm add es6-module-transpiler-yui-formatter","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required runtime dependency; the formatter is a plugin for the transpiler","package":"es6-module-transpiler","optional":false}],"imports":[{"note":"CommonJS require is the standard way; no default ESM export.","wrong":"var YUIFormatter = require('yui-formatter');","symbol":"YUIFormatter","correct":"var YUIFormatter = require('es6-module-transpiler-yui-formatter');"},{"note":"Container is provided by the main transpiler package, not the formatter.","wrong":"var Container = require('es6-module-transpiler-yui-formatter').Container;","symbol":"Container","correct":"var Container = require('es6-module-transpiler').Container;"},{"note":"FileResolver is from the transpiler package.","wrong":"var FileResolver = require('es6-module-transpiler-yui-formatter').FileResolver;","symbol":"FileResolver","correct":"var FileResolver = require('es6-module-transpiler').FileResolver;"}],"quickstart":{"code":"var transpiler = require('es6-module-transpiler');\nvar YUIFormatter = require('es6-module-transpiler-yui-formatter');\nvar Container = transpiler.Container;\nvar FileResolver = transpiler.FileResolver;\n\nvar container = new Container({\n  resolvers: [new FileResolver(['lib/'])],\n  formatter: new YUIFormatter()\n});\n\ncontainer.getModule('index');\ncontainer.write('out/mylib.js');","lang":"javascript","description":"Demonstrates programmatic usage of the YUI formatter with es6-module-transpiler: create container, set resolver and formatter, compile module, write output."},"warnings":[{"fix":"Migrate to a modern module transpiler like Babel or TypeScript and output UMD or ES modules.","message":"This package is deprecated. It has not been updated since 2015 and relies on an abandoned transpiler. Modern projects should use Babel or TypeScript.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Avoid relying on live bindings. Re-export values explicitly if needed.","message":"Live 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.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Ensure es6-module-transpiler is pinned to 0.10.x in package.json.","message":"Requires es6-module-transpiler version 0.10.x to work. Using newer or older versions may cause compatibility issues.","severity":"gotcha","affected_versions":">=0.3.0"},{"fix":"Use programmatic API or switch to a different build tool.","message":"The CLI tool 'compile-modules' is no longer maintained and may not install correctly.","severity":"deprecated","affected_versions":">=0.0.1"},{"fix":"Ensure imports of default exports occur after the module is loaded or use named exports instead.","message":"Default 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.","severity":"gotcha","affected_versions":">=0.1.0"}],"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-yui-formatter --save-dev' in your project directory.","cause":"The package is not installed or is installed globally but not locally.","error":"Error: Cannot find module 'es6-module-transpiler-yui-formatter'"},{"fix":"Use: var YUIFormatter = require('es6-module-transpiler-yui-formatter');","cause":"The require returns the module, but the formatter is the module itself, not a property.","error":"TypeError: YUIFormatter is not a constructor"},{"fix":"Ensure es6-module-transpiler is installed and configured with the YUI formatter.","cause":"The code uses ES6 module syntax but the transpiler/formatter is not set up correctly.","error":"SyntaxError: Unexpected token export"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}