-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.js
44 lines (40 loc) · 1.28 KB
/
main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// awful, awful UMD boilerplate, however, this makes it just work™ everywhere
// make sure you add dependencies in all three places (amd, cjs, global)
+function(root, factory) {
if (typeof define === 'function' && define.amd) {
define([
'ember',
'./lib/components/ic-progress-bar',
'ic-styled',
'./lib/templates',
], function(Ember, IcProgressBarComponent) {
return factory(Ember, IcProgressBarComponent);
});
} else if (typeof exports === 'object') {
module.exports = factory(
require('ember'),
require('./lib/components/ic-progress-bar'),
require('ic-styled'),
require('./lib/templates')
);
} else {
factory(
Ember,
IcProgressBarComponent
);
}
}(this, function(Ember, IcProgressBarComponent) {
// automatically register components/views etc. on the container so that
// consumers of the library don't have to do it.
Ember.Application.initializer({
name: 'ic-progress-bar',
initialize: function(container, application) {
container.register('component:ic-progress-bar', IcProgressBarComponent);
}
});
// return all the things so people don't have to dig down into the repository
// to access the objects in lib
return {
IcProgressBar: IcProgressBarComponent
};
});