anodynos / uRequire

The Ultimate JavaScript Module Builder & Automagical Task Runner. Convert AMD & CommonJS/NodeJS modules to UMD, AMD, CommonJS or bundle them as `combined.js` (rjs & almond, AMDclean soon) & automagically run/test/watch them on nodejs, Web/AMD or Web/Script. Declarative & DRY config with inheritance. Manipulate & inject dependencies, module code, banners, version etc while building with a single line. Support two kinds of plugins, ResourceConverter (i.e file level) and AfterBuilder (i.e the whole bundle). Transparent support for Coffeescript, IcedCoffeescript, Coco, LiveScript – they’re just JavaScript :-)
http://anodynos.github.io/uRequire
MIT License
265 stars 20 forks source link

Replace wrench with 'rimraf' and 'mkdirp' #37

Closed englercj closed 10 years ago

englercj commented 10 years ago

Wrench has some known issues on windows, replace that library with some different ones.

Should fix #33.

Please note: As I look through the code I see a lot of synchronous file methods, these are likely why building with this library takes so long. Converting these to async counterparts will likely make things run much, much faster.

englercj commented 10 years ago

Note the Travis build fails since I didn't commit new build files; but did change package.json to not require wrench anymore. Wasn't sure if you wanted new build files in the commits.

anodynos commented 10 years ago

Great, thanks.

Please note: As I look through the code I see a lot of synchronous file methods, these are likely why building with this library takes so long. Converting these to async counterparts will likely make things run much, much faster.

I would love to refactor it to async promises for #30 and many good reasons, but its too much work at the moment, and only a slight benefit.

Correct me if Im wrong, but I dont think the async will make a huge speed difference for this kind of tool. I/O isnt that much - most of the time is spent on javascript parsing, calculating deps & Business Logic & converting to templates.

So refactoring to Promises, will have to wait a long while (unless somone voluunteers?).

BTW if you use build.watch, (and doesn't go #33) you 'll be getting the benefits of converting ONLY what changed (not seemed to, really has changed), which is super fast.