Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.
/ es6y Public archive

An ES6 to ES5 transpiler, optionally convert AMD module to YUI3 style

License

Notifications You must be signed in to change notification settings

g13n/es6y

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

ES6Y

An ES6 to ES5 transpiler optionally convert AMD module to YUI3 style using the Facebook's jstransform module.

The following program:

	define('yui-module-test', [ 'yui', 'node' ], function (Y, node) {
	    console.log(Y.one('#node').setHTML([3, 1, 2].sort((a, b) => { return b - a; })));
	});

gets transformed into:

	YUI.add('yui-module-test', function (Y) {
	    console.log(Y.one('#node').setHTML([3, 1, 2].sort(function(a, b)  { return b - a; })));
	}, '1.0.0', { requires: [ 'node' ] });

Run es6y --help to get started.

Running

	shell$ es6y --yui3 -- input.js
	# creates compiled/input.js
	shell$ es6y --yui3 <input.js
	# outputs the converted file on standard output
	shell$ es6y --outdir=/tmp/js --yui3 -- file1.js file2.js
	# creates /tmp/js/file1.js, /tmp/js/file2.js with the converted output

About

An ES6 to ES5 transpiler, optionally convert AMD module to YUI3 style

Resources

License

Stars

Watchers

Forks

Packages

No packages published