Re: Shepherd.js - Implementing Harmony modules for today's browsers

2012-04-19 Thread Xavier CAMBAR
Russell, I've worked on this branch during the evening: https://github.com/xcambar/shepherd-js/tree/20120420_CommentRemoval, Currently, single line comments must still wrap the module declaration, but this version offers a good comparison point in regards to the master branch. Rick, I've seen this

Re: Shepherd.js - Implementing Harmony modules for today's browsers

2012-04-19 Thread Rick Waldron
On Thu, Apr 19, 2012 at 9:11 AM, Russell Leggett wrote: > [snip] > Support is coming. I look at it this way. Some day relatively soon, ES6 > modules will be in node. Soon after that they will start showing up in > browsers. Over the course of the next year, I bet you'll see module support > in at

Re: Shepherd.js - Implementing Harmony modules for today's browsers

2012-04-19 Thread Xavier CAMBAR
You've made solid points here! The various comments I've received from here and there show the same direction: someday, modules will be available, and Shepherd will then be unnecessary for supported engines. Polyfilling remains. If it ever gains some momentum, it is highly related to how it follow

Re: Shepherd.js - Implementing Harmony modules for today's browsers

2012-04-19 Thread Russell Leggett
On Wed, Apr 18, 2012 at 10:21 AM, Xavier CAMBAR wrote: > Thanks for your comments, I'm glad you liked it. > About CommonJS, the compatibility is the other way round. Shepherd can > load commonJS modules without the addition of the in-comment syntax > declaration. In such a case, require is wrappe

Re: Shepherd.js - Implementing Harmony modules for today's browsers

2012-04-19 Thread Xavier CAMBAR
@David: I am all ears to your comments! @Erik: As you may have read in this thread, it seems that the major request is for the removal of comments. So, here I announce it: the feature has just bumped to the top of the TODO list :) Thanks for the pointers. I'll probably have a closer look at the fu

Re: Shepherd.js - Implementing Harmony modules for today's browsers

2012-04-18 Thread Erik Arvidsson
This is quite interesting. I really feel that the comment syntax is pretty ugly. Parsing JS is non trivial but it is not a performance issue. If you expect this to have some uptake I would expect it to use the "real" module syntax and not rely on comments. By coincidence I landed import support to

Re: Shepherd.js - Implementing Harmony modules for today's browsers

2012-04-18 Thread David Herman
Hi Xavier, It's great to see this project! I'll take a closer look soon. I will see if I can help contribute to this. Dave On Apr 18, 2012, at 5:20 AM, Xavier CAMBAR wrote: > Hi, > I wanted to announce that I've been working on a project called Shepherd > (http://xcambar.github.com/shepherd-j

Re: Shepherd.js - Implementing Harmony modules for today's browsers

2012-04-18 Thread Xavier CAMBAR
Thanks for your comments, I'm glad you liked it. About CommonJS, the compatibility is the other way round. Shepherd can load commonJS modules without the addition of the in-comment syntax declaration. In such a case, require is wrapped to load whether an already loaded ES6 module or use commonJS's

Re: Shepherd.js - Implementing Harmony modules for today's browsers

2012-04-18 Thread Russell Leggett
This is great! I've been considering doing the same thing, but I haven't found the time. When you say it is compatible with CommonJS modules, does that mean that you can do an import using ES6 syntax and have the result do a CommonJS require? The big thing I'm noticing is that all of the examples

Shepherd.js - Implementing Harmony modules for today's browsers

2012-04-18 Thread Xavier CAMBAR
Hi, I wanted to announce that I've been working on a project called Shepherd ( http://xcambar.github.com/shepherd-js), a pure Javascript implementation of Harmony modules. Why such a project ? Fun first. Second, I was really looking forward to use harmony modules. Third, I wanted an efficient way