Wednesday, April 29, 2015

Using npm to download bower packages

At work we are using npm packages along with require.js  and the webpack module bundler in our gulp build chain.  Overall this works quite nicely, however as many folks do, we were also using bower as the front-end package manager.  While there is nothing wrong with this, bower is just one more piece of the JavaScript jig-saw puzzle that was adding noise in our system.

My coworker had the idea to drop bower from the chain, and simply use npm in its place.  This change is very simple.  In our package.json file he added entries inside the dependencies object for each bower package we had a dependency on, including its repository path.

  "dependencies": {
    "Class.js": "git://", <-- bower package
    "angular": "=1.3.14", <-- npm package
    "angular-cookie": "git://"  <-- bower package

This simple change has allowed us to clean up our build tasks and make the process just a little simpler.

Friday, April 17, 2015

Minneapolis - Tech Conference - MinneBar

Last weekend, I attended the MinneBar (un)conference.  I've been to other (un)conferences in the past and they seemed quite diminutive in scale compared with MinneBar.  I don't have an exact figure, but the head count was quite high.  Overall it was a very good experience.  As always I felt the best thing I personally got out of the conference was a boost of motivation.  Software development can be tedious and draining work. Meeting with group of like minded passionate people looking to learn something new is very encouraging.  

If your in the area check out the minnebar website and look into attending next year...

Monday, April 13, 2015

Easy Angular Performance Boost

We've been working on profiling and optimizing our Angular app at work.  During that process I found an easy performance tweak that was slipped into Angular somewhere around version 1.3x.  It's simply setting provided by the compile provider.
myApp.config(['$compileProvider', function ($compileProvider) {
Surprisingly, this provided a very visible performance increase in our application.  It works by removing ng-scope and ng-isolated-scope directives from the code, meaning less work for the browser as it runs.

If your running Angular >=1.3x and you haven't set this already check it out!