Dependency Management Got Awesome CommonJS and AMD Compliant dependency loader for modern web apps

Accouncing Inject 0.5.0

05 August 2013 • By: Fermin Simeon

Get this release over at the downloads page


0.5.0 contains some backwards incompatible changes. Please see the compatibility section below. 0.5.0 enables Bower support, fixes common configuration issues as reported by users, and supports a mixing script tags with AMD, which is common in large sites that are attempting to long-transition to an AMD system.

New Features

Introducing the addX Suite: The original addRule() has grown organically over time, and reached a point where it was overloaded and performing too many functions. We’ve divided addRule up into several new methods

  • addContentRule: Replaces the afterFetch pointcut previously used
  • addFetchRule: Provides module level control of how content is downloaded. This enables alternate download methods should Inject’s XHR methods not be sufficient
  • addFileRule: Replaces the path property used in addRule. Used to translate a moduleID into a URL.
  • addModuleRule: Change how a module’s ID is resolved. Often used to change where a “global” module such as jquery may be located
  • addPackage: Allows you to globally alias a module. This allows you to define “global” modules, even though their installed location is different.

Bower Inject is now listed on Bower:!/search/injectjs

Dev Changes

security When using Inject’s Cross-Domain setup, localStorage is now used on the remote side as opposed to the local side. When using a CDN, this greatly improves security by not putting your javascript on the same domain as user generated content.

defaults The default cache life is now 0, meaning no cache is used unless explicitly set

Bug Fixes

  • CommonJS Scan does not occur if dependencies are set

Tickets From This Release

  • #213 Component JSON for Bower
  • #217 Remote localStorage Cache
  • #226 Default cache life is now 0
  • #234 CommonJS Scan does not occur if dependencies are set
  • #238 dividing addRule into multiple methods
  • #244 Inject config to disable global AMD
  • #246 Removal of before/after pointcuts
  • #248 grunt “release” task to make tar+gzip
  • #256 Fix css Plugin in IE7

We welcome feedback and discussion on all news items on our Google Groups Mailing List