forked from Meteor-Community-Packages/meteor-tabular
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpackage.js
More file actions
executable file
·91 lines (81 loc) · 2.25 KB
/
package.js
File metadata and controls
executable file
·91 lines (81 loc) · 2.25 KB
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
/* global Package, Npm */
Package.describe({
name: 'aldeed:tabular',
summary: 'Datatables for large or small datasets in Meteor',
version: '1.5.5',
git: 'https://github.com/aldeed/meteor-tabular.git'
});
Npm.depends({
datatables: '1.10.9'
});
Package.onUse(function(api) {
api.versionsFrom(['METEOR@0.9.4', 'METEOR@1.0']);
api.use([
'check',
'underscore',
'mongo',
'blaze',
'templating',
'reactive-var',
'tracker',
'ecmascript'
]);
// jquery is a weak reference in case you want to use a different package or
// pull it in another way, but regardless you need to make sure it is loaded
// before any tabular tables are rendered
api.use(['jquery'], 'client', {weak: true});
api.use(['meteorhacks:subs-manager@1.2.0'], ['client', 'server'], {weak: true});
api.export('Tabular');
api.export('Util', 'client');
api.addFiles('common.js');
api.addFiles('server/tabular.js', 'server');
api.addFiles([
'.npm/package/node_modules/datatables/media/js/jquery.dataTables.js',
// 'client/lib/dataTables.bootstrap.js',
// 'client/lib/dataTables.bootstrap.css',
'client/tabular.html',
'client/util.js',
'client/tableRecords.js',
'client/tableInit.js',
'client/pubSelector.js',
'client/tabular.js'
], 'client');
// images
if (typeof api.addAssets === 'function') {
api.addAssets([
'images/sort_asc.png',
'images/sort_asc_disabled.png',
'images/sort_both.png',
'images/sort_desc.png',
'images/sort_desc_disabled.png'
], 'client');
} else {
api.addFiles([
'images/sort_asc.png',
'images/sort_asc_disabled.png',
'images/sort_both.png',
'images/sort_desc.png',
'images/sort_desc_disabled.png'
], 'client');
}
});
// Follow this guide: https://github.com/awatson1978/meteor-cookbook/blob/master/cookbook/writing.unit.tests.md
Package.onTest(function(api) {
// Tiny Test
api.use(['aldeed:tabular', 'tinytest']);
api.use([
'anti:fake',
'check',
'underscore',
'reactive-var',
'tracker',
'ecmascript'
]);
// Load this first:
api.addFiles('tests/reusedFunctions.js', 'client');
api.addFiles([
'tests/util.js',
'tests/mongoDBQuery.js',
'tests/utilIntegration.js'
], 'client' );
});