esnext / es6-module-transpiler

Tomorrow’s JavaScript module syntax today
http://esnext.github.io/es6-module-transpiler/
Other
1.21k stars 85 forks source link

readFileSync doesn't like reading from directories #199

Closed SnarkBoojum closed 8 years ago

SnarkBoojum commented 8 years ago

While trying to use es6-module-transpiler 0.10.0 on es6-promise, I had problems because readFileSync was used on a directory. After some poking around, it appears that the problem is due to the fact that they have a lib/es6-promise/promise.js and a lib/es6-promise/promise/.

The following patch solved the problem for me: diff --git a/lib/module.js b/lib/module.js index 96529c5..a659641 100644 --- a/lib/module.js +++ b/lib/module.js @@ -136,7 +136,11 @@ memo(Module.prototype, 'ast', /* @this Module _/function() { * @name Module#src / memo(Module.prototype, 'src', /_* @this Module */function() {

 /**

Of course it's more a hack than a solution... but it can be helpful nonetheless.

jamiebuilds commented 8 years ago

From the README:

NOTE: This project been deprecated in favor of Babel & Esperanto.

SnarkBoojum commented 8 years ago

And esperanto is deprecated in favor of rollup... sigh, I'll have a look at those. Thanks!