import script --> .esm

C. Scott Ananian ecmascript at
Wed Sep 10 19:45:23 PDT 2014

For what it's worth, node already deals with 'modules' versus 'plain
scripts'.  The latter typically start with `#!` and are found in a `bin`
subdirectory.  In case of ambiguity you can add `/* jshint ... */`
directives as necessary to select the appropriate language mode.  I don't
see this as a big deal, although I wouldn't object to .jsm being

Wrt to the proposed `default.js` convention: node doesn't *need* to specify
a main entry point in the `package.json`. It could have chosen an arbitrary
convention. Overriding the entry point allows for extra flexibility in
practice, especially when adapting to legacy projects' existing directory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list