Needlepoint 1.0.5

For more information on Needlepoint– my JavaScript dependency injection system–you can take a look at my introductory blog post or the README file on GitHub.

I have updated Needlepoint to version 1.0.5 in NPM. There’s a couple changes, none of which should break if you use an older version and upgrade to this version.

Needlepoint is now pre-compiled

This means you don’t have to have an entry for the library in your Babel ignore configuration. My first blog post mentions that your Babel configuration should look something like this:

The ignore property is no longer required.

Updated for Babel 6

I also updated the library and instructions to use Babel 6. If you are using Needlepoint with Babel 6, you will have to use the new presets property for your Babel configuration and add the babel-plugin-transform-decorators-legacy plugin. Babel 6 removed the old ES7 decorator functionality and the contributors are re-writing it. However, the legacy plugin enables the decorator functionality now.

To do so, you must install the plugin’s NPM package:

Then, once you install the plugin package, you can add it to your Babel configuration:

As you can see in the sample above, I’ve also included the es2015, stage-0, and stage-1 presets for Babel. You can adjust these as needed for your application.

Get Tutorials and Articles on JavaScript

Learn how to use the latest ES6/ES7 features.