Detect presence of Ember-CLI

I have an Ember library/addon that’s namespaced in a global object. Now that Ember-CLI is becoming the standard for Ember apps, I’d like to have it work with Ember-CLI’s module loader. I’ve already converted everything to modules, but I have a small issue. I would like the library to use modules if possible, but fall back to the global object if not. The catch is that the modules do not work with the RequireJS module loader, only Ember-CLI’s module loader. Because of this, I’d like to be able to detect the presence of Ember-CLI (its module loader) and bootstrap the library accordingly.

Is there any way to detect the Presence of Ember-CLI, specifically it’s module loader?

Hi, I have the impression that you do not understand Ember CLI or perhaps I did not understand what you are trying to do.

Ember CLI is a command line utility that allows your to eventually build a full ember application as a set of assets and an index.html. Ember CLI is not executed in the user’s browser, so there is no need to check if it’s installed or not in order to use some sort of fallback.

That’s why I’m specifically looking for how to detect the module loader, not Ember CLI. I realize that Ember CLI is mostly just a command line utility, but it also injects quite a bit of runtime code into your application (the resolver and the module loader being the biggest examples). While it’s theoretically possible to for those to be de-coupled, I doubt it will happen. And 99% of the consumers of my library are going to be using either Ember CLI or a global Ember application. I would just like to know who’s using Ember CLI so I can bootstrap the application appropriately without having to distribute 2 separate builds.