ModuleSpecifier: include ".js" or not?

2015-04-14 Thread Axel Rauschmayer
In Node.js you can either mention the file extension ".js" or omit it when you require a module. Which one is preferred for ES6 ModuleSpecifiers? Thanks! Axel -- Dr. Axel Rauschmayer a...@rauschma.de rauschma.de ___ es-discuss mailing list es-disc

Re: ModuleSpecifier: include ".js" or not?

2015-04-14 Thread Wes Garland
Some food for thought from a non-standard use-case. In GPSEE, we can require("module") - but we support both modules written in JavaScript, and modules written in C (technically, any compiled binary with the correct C API), or both. We dlload("module.so") (if present), then interpret "module.js" (

Re: Re: ModuleSpecifier: include ".js" or not?

2015-04-15 Thread monolithed
This question has already been asked https://mail.mozilla.org/pipermail/es-discuss/2015-February/041430.html I prefer to follow the following rules: File structure ``` root/ foo/ index.js ``` Export module ```js export default foo class () {} ``` Import module