David Bashford

A web dev blog from a Washington DC based Dad, UI architect, web developer, and creator of Mimosa.


Mimosa 2.3 Released

Today I released Mimosa 2.3. After 21 point releases on 2.2, this marks the first non-patch release in awhile. Here's a quick rundown of what to expect.

Fix for Chrome + CSS Live Reload

Mimosa's live reload module is capable of updating CSS without needing to reload the page. It does this by altering the URL to force a reload of the asset from the server. When the asset is loaded the new CSS is reevaluated and the page is repainted.

Some months back there were changes to how and when Chrome loaded, evaluated and repainted the page when CSS assets were updated. Chrome loads the updated CSS when expected, evaluates it, but does not affect a repaint unless the browser window has focus. If you have the browser behind your editor or on another monitor, you'd need to wave your mouse over Chrome to see the change happen. That is better than no live reload at all, but not not quite the same.

It took a couple stabs at it before finally coming up with the right hack to get this back to normal. Previously a query parameter was tweaked to force the CSS to reload. With the latest version of mimosa-live-reload the query parameter was not cutting it.

Now, just in Chrome (other browsers never stopped working) the CSS URLs are outright broken and then fixed. That convinces Chrome to do the repaint regardless of focus.

The small downside of this is you'll see a 404 in your debugger for the split second. But the net effect is the instant updating live reload you'd expect.

Updates for mimosa new

Since before 1.0 was released, very little has been changed for the mimosa new command. It went through a minor refactor that didn't result in any functionality or behavior changes, but that's it.

This release sees big updates to the servers you can get from mimosa new.

Getting Hapi

Hapi has been added as a server option. I've been playing around with Hapi myself and have enjoyed working with it. Now with mimosa new you can get a Hapi server delivered and ready to go for any of the 6 server templating options mimosa new supports.

Additionally a new skeleton has been created that incorporates Hapi along with Angular.js and Browserify.

Updating Express

The existing Express server received a huge overhaul. It's now up to date with the latest Express 4.7.2 after being stuck at 3.4 for awhile. Additionally all of the other dependencies have been updated to the latest and any required code changes as a result of those updates have been included.

Adding Express + Socket.io

New with 2.3 is an Express server that comes with Socket.io. Some of the most frequent questions I get are how to get socket.io set up with Mimosa such that Mimosa's live reload uses it. This new server option comes with that already set up.

New RPM Packaging Module

mimosa-rpm-package works much like the popular web-package module, but uses easy-rpm to create an RPM archive of an application.

server-reload Fixed Up

mimosa-server-reload, which will restart your node server when server assets change, has been plagued with timing issues going back to when it was created. Like with the live-reload issue above, it took a few hacks to get it right, but the timing issue has been addressed.

Across the Board Library Updates

Virtually every module (that I am responsible for) has had its dependencies updated. Additionally those modules, like those responsible for mimosa new and the template compilers, now deliver the latest versions of client libraries and server assets.

Also, from 2.2.20

A few patch releases ago a small change to mimosa-require -- the module responsible for providing support for AMD/RequireJS applications (like optimization of assets, validation of paths) -- resulted in a 20% - 50% performance improvement for large (100+ file) applications. Performance improvements will vary a bit depending on the sort of hardware you work with.

Up Next?

In the near-term:

  • A few skeletons on the way including ones for Marionette and Ember, from myself and some others.
  • A module for managing delivery of features via feature flags
  • A module for managing ember.js module imports, a build-tool "resolver" of sorts, that will determine what files need to be required for your Ember application and make sure you do not have to manage pulling them all in yourself
  • Tests for existing modules.
comments powered by Disqus