Fetching contributors…
Cannot retrieve contributors at this time
43 lines (26 sloc) 1.77 KB


What is it ?

Shepherd is a polyfill for the new module syntax coming in ECMAScript:Harmony.

Shepherd enables the Harmony modules syntax in engines that don't support it yet. ES:Harmony:modules compatible files can not be parsed on non ES6-enabled engines, unless using a polyfill such as Shepherd.

Quick features list


  • is cross-side, which means it works well in the browser and in the server
  • has a ECMAScript Harmony compatible syntax
  • Ennables files/libraries you can not modify (eg, jQuery from a CDN) to be declared as modules
  • Provides an optimizer + minifier (using UglifyJS for production

Want more ?

You may want to check out the home page (which indeed uses Shepherd itself) or maybe even the tests.


You can join me:


Shepherd uses a number of excellent third-party software. Here's an exhaustive list:

  • JISON, a port of Bison written in Javascript. Used to build the parser for the module syntax
  • when.js, a Promises/A compliant library. Used to handle dependencies and async operations
  • UglifyJS used in the build process for target generation and minification. Also used in the optimizer
  • node-optimist for parsing command-line parameters in the optimizer

Many thanks to the authors, your work is incredible, your contribution invaluable!!

And last but not least: