-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathpackage.js
90 lines (79 loc) · 2.45 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
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
Package.describe({
name: 'jagi:astronomy-validators',
version: '1.1.2',
summary: 'Validators for Meteor Astronomy',
git: 'https://github.com/jagi/meteor-astronomy-validators.git'
});
Package.onUse(function(api) {
api.versionsFrom('1.1.0.2');
api.use('jagi:astronomy@1.2.3');
api.use('jagi:reactive-map@2.0.0');
api.use('underscore');
api.use('check');
api.use('tracker');
api.use('ejson');
api.imply('jagi:astronomy');
// Module.
api.addFiles([
'lib/module/global.js',
'lib/module/validation_error.js',
'lib/module/validation_error_event.js',
'lib/module/validator.js',
'lib/module/field_validator.js',
'lib/module/create_validator.js',
'lib/module/validate.js',
'lib/module/get_error.js',
'lib/module/ejson.js',
'lib/module/init_class.js',
'lib/module/init_definition.js'
], ['client', 'server']);
// Type validators.
api.addFiles([
'lib/validators/type/string.js',
'lib/validators/type/number.js',
'lib/validators/type/boolean.js',
'lib/validators/type/array.js',
'lib/validators/type/object.js',
'lib/validators/type/date.js',
'lib/validators/type/email.js',
'lib/validators/type/url.js'
], ['client', 'server']);
// Existence validators.
api.addFiles([
'lib/validators/existence/required.js',
'lib/validators/existence/null.js',
'lib/validators/existence/not_null.js',
], ['client', 'server']);
// Size validators.
api.addFiles([
'lib/validators/size/length.js',
'lib/validators/size/min_length.js',
'lib/validators/size/max_length.js',
'lib/validators/size/gt.js',
'lib/validators/size/gte.js',
'lib/validators/size/lt.js',
'lib/validators/size/lte.js'
], ['client', 'server']);
// Comparison validators.
api.addFiles([
'lib/validators/comparison/choice.js',
'lib/validators/comparison/unique.js',
'lib/validators/comparison/equal.js',
'lib/validators/comparison/equal_to.js',
'lib/validators/comparison/regexp.js'
], ['client', 'server']);
// Logical validators.
api.addFiles([
'lib/validators/logical/and.js',
'lib/validators/logical/or.js',
'lib/validators/logical/if.js',
'lib/validators/logical/switch.js'
], ['client', 'server']);
// Embeded validators.
api.addFiles([
'lib/validators/nested/every.js',
'lib/validators/nested/has.js',
'lib/validators/nested/contains.js'
], ['client', 'server']);
api.export(['Validators'], ['client', 'server']);
});