0.0.4 • Published 9 years ago

ember-cli-hash-anywhere v0.0.4

Weekly downloads
1
License
MIT
Repository
github
Last release
9 years ago

ember-cli-hash-anywhere

Deprecation Notice: This add-on was developed to address issues I was facing in Ember CLI 0.2.0. Changes released in Ember CLI 0.2.5 appear to address the pain that this add-on was designed to alleviate. Therefore this entire add-on is deprecated, especially if you're using Ember CLI 0.2.5+.

It was fun, my Ember friends. RIP ember-cli-hash-anywhere. :sob:

Your desire is the combination of these 2 things, which is not supported by Ember CLI out of the box:

  • You want to use the old-school hash-based routing in your Ember application (e.g., https://app.example.com/#/friends/123).
  • You want for this routing to completely ignore the path part of the URL and still serve up your app/index.html page (for example: ignore the about/team part of https://app.example.com/about/team/#/friends/123).

So you install this add-on, and it works all magic-like!

Installation

Run this command:

$ ember install:addon ember-cli-hash-anywhere

Under the Hood

I cannot say that this implementation is all that fancy though. It was just a matter of copying Ember CLI's history-support-middleware server middleware and making a minor tweak to make it run when config.locationType is set to hash.

Semantic Versioning

ember-cli-hash-anywhere honors the concepts behind semantic versioning:

Given a version number MAJOR.MINOR.PATCH, increment the:

  1. MAJOR version when you make incompatible API changes,
  2. MINOR version when you add functionality in a backwards-compatible manner, and
  3. PATCH version when you make backwards-compatible bug fixes.

License

Copyright 2015 Minimal Orange, LLC.

ember-cli-hash-anywhere is released under the MIT License.