-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathindex.js
92 lines (87 loc) · 3.72 KB
/
index.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
/* jshint node: true */
'use strict';
var merge = require('merge');
module.exports = {
name: 'ui-list',
description: 'List controls for ambitious Ember applications',
normalizeEntityName: function() {}, // no-op since we're just adding dependencies
included: function(app) {
this._super.included(app);
var o = merge(
{ fa: false, animate: false, quiet: false, animateOperation: 'override' },
app.options['ui-list']
);
// component CSS
app.import('vendor/ui-list/ui-list.css');
app.import('vendor/ui-list/ui-item.css');
app.import('vendor/ui-list/ui-table.css');
app.import('vendor/ui-list/ui-pagination.css');
app.import('vendor/ui-list/ui-controls.css');
app.import('vendor/ui-list/ui-list-sorting.css');
app.import('vendor/ui-list/ui-list-layout.css');
app.import('vendor/ui-list/ui-list-plus.css');
app.import('vendor/ui-list/ui-list-flat.css');
app.import('vendor/ui-list/ui-list-simple.css');
app.import('vendor/ui-list/ui-list-nav.css');
app.import('vendor/ui-list/ui-list-tab.css');
// animations
// var defaultAnimations = [
// 'attention_seekers/bounce.css',
// 'attention_seekers/flash.css',
// 'attention_seekers/pulse.css',
// 'attention_seekers/rubberBand.css',
// 'attention_seekers/shake.css',
// 'attention_seekers/swing.css',
// 'attention_seekers/tada.css',
// 'attention_seekers/wobble.css'
// ];
// specific to this addon
app.import('vendor/ui-icon/ui-icon.css');
// var faMessage = 'font-awesome not referenced explicitly';
// if(o.fa) {
// // font-awesome
// faMessage = 'fa fonts/css added';
// app.import('bower_components/font-awesome/css/font-awesome.css', {overwrite: true});
// app.import('bower_components/font-awesome/fonts/fontawesome-webfont.eot',{destDir: 'fonts', overwrite: true});
// app.import('bower_components/font-awesome/fonts/fontawesome-webfont.svg',{destDir: 'fonts', overwrite: true});
// app.import('bower_components/font-awesome/fonts/fontawesome-webfont.ttf',{destDir: 'fonts', overwrite: true});
// app.import('bower_components/font-awesome/fonts/fontawesome-webfont.woff',{destDir: 'fonts', overwrite: true});
// app.import('bower_components/font-awesome/fonts/fontawesome-webfont.woff2',{destDir: 'fonts', overwrite: true});
// app.import('bower_components/font-awesome/fonts/FontAwesome.otf',{destDir: 'fonts', overwrite: true});
// }
// var animations = [];
// var animateRoot = 'bower_components/animate.css/source/';
// var animateMessage = 'no animations loaded';
// if(o.animate) {
// // annimate.css
// app.import(animateRoot + '_base.css');
// if(o.animate === 'default') {
// animations = defaultAnimations;
// animateMessage = 'default animations loaded';
// } else {
// if(o.animateOperation === 'append' ) {
// animateMessage = 'adding configured animations to default';
// animations = o.animate.concat(defaultAnimations);
// } else {
// animateMessage = 'replace default animations with configured';
// animations = o.animate;
// }
// if(! animations instanceof array) {
// animateMessage = 'tried to use config for animation but ran into problems!';
// animations = [];
// }
// }
// animations.map(function(cssFile) {
// if(cssFile.slice(0,1) === '/' ) {
// cssFile = 'app/ui-icon/' + cssFile;
// } else {
// cssFile = animateRoot + cssFile;
// }
// app.import(cssFile);
// });
// }
// if(!o.quiet) {
// console.log('ui-list: %s, %s', faMessage, animateMessage);
// }
}
};