Skip to content

marijnh/tariff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tariff

var tariff = import("tariff")
tariff('import {foo} from "./bar"\nexport let baz = foo(1)')
// -> 'var foo = require("./bar").foo\nlet baz = exports.baz = foo(1)'

If you treat exports as values, not bindings, and don't do anything fancy, you can use tariff to convert ES6 import and export declarations into CommonJS equivalents.

Released under an MIT license.

About

Crudely convert ES6 import/export declarations to CommonJS

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published