1 | var opts = {
|
2 | xhr: require('./xhr'),
|
3 | jquery: require('./jquery'),
|
4 | angular: require('./angular'),
|
5 | };
|
6 | var _ = require('lodash');
|
7 |
|
8 | // remove modules that have been ignored by browserify
|
9 | _.each(opts, function(conn, name) {
|
10 | if (typeof conn !== 'function') {
|
11 | delete opts[name];
|
12 | }
|
13 | });
|
14 |
|
15 | // custom _default specification
|
16 | if (opts.xhr) {
|
17 | opts._default = 'xhr';
|
18 | } else if (opts.angular) {
|
19 | opts._default = 'angular';
|
20 | } else {
|
21 | opts._default = 'jquery';
|
22 | }
|
23 |
|
24 | module.exports = opts;
|