-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.js
62 lines (52 loc) · 1.69 KB
/
package.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
Package.describe({
name: 'cwohlman:payments',
summary: 'Bulletproof payment processing logic.',
version: "0.4.4",
git: 'https://github.com/cwohlman/meteor-payments.git'
});
Package.onUse(function(api) {
api.versionsFrom('1.0');
api.use('underscore');
api.use('mongo');
api.use('check');
api.use('accounts-base');
// Public api
api.addFiles('payments.js');
api.export('Payments');
// Collections
api.addFiles('collections/logs.js');
api.addFiles('collections/customers.js');
api.addFiles('collections/paymentMethods.js');
api.addFiles('collections/transactions.js');
// Helpers
// api.addFiles('helpers/associateCredits.js');
// api.addFiles('helpers/associateDebits.js');
// api.addFiles('helpers/associateOrders.js');
// api.addFiles('helpers/associateGuard.js');
// Guards
api.addFiles('guards/errors.js');
api.addFiles('guards/preventOverCharge.js');
api.addFiles('guards/preventWrongCard.js');
api.addFiles('guards/preventNonIntegerAmounts.js');
api.addFiles('guards/preventNonExistantUser.js');
// Operations
api.addFiles('operations/operation.js');
api.addFiles('operations/createPaymentMethod.js');
api.addFiles('operations/createTransaction.js');
});
Package.onTest(function(api) {
api.use('tinytest');
api.use('underscore');
api.use('mongo');
api.use('autopublish');
api.use('cwohlman:payments');
// The mock payment provider
api.addFiles('tests/mock-provider.js');
api.addFiles('tests/mock-app.js');
// These files actually run our tests
api.addFiles('tests/operation.js');
api.addFiles('tests/logs.js');
api.addFiles('tests/transactions.js');
api.addFiles('tests/guards.js');
api.addFiles('tests/builtin-guards.js');
});