forked from Meteor-Community-Packages/meteor-roles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.js
62 lines (48 loc) · 1.39 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
/* eslint-env meteor */
Package.describe({
summary: 'Authorization package for Meteor',
version: '4.0.0',
git: 'https://github.com/Meteor-Community-Packages/meteor-roles.git',
name: 'alanning:roles'
})
Package.onUse(function (api) {
api.versionsFrom(['2.8.1', '3.0'])
const both = ['client', 'server']
api.use([
'ecmascript',
'accounts-base',
'tracker',
'mongo',
'check',
'ddp'
], both)
api.use('zodern:types@1.0.13')
api.use(['blaze@2.9.0 || 3.0.0'], 'client', { weak: true })
api.export(['Roles', 'RolesCollection', 'RoleAssignmentCollection'])
api.addFiles('roles/roles_client.js', 'client')
api.addFiles('roles/roles_common_async.js', both)
api.addFiles('roles/roles_server.js', 'server')
api.addFiles([
'roles/client/debug.js',
'roles/client/uiHelpers.js'
], 'client')
})
Package.onTest(function (api) {
// Add code coverage
api.use([
'lmieulet:meteor-legacy-coverage',
'lmieulet:meteor-coverage@4.1.0 || 5.0.0',
'meteortesting:mocha@2.1.0 || 3.2.0'
])
api.versionsFrom(['2.8.1', '3.0'])
const both = ['client', 'server']
// `accounts-password` is included so `Meteor.users` exists
api.use([
'ecmascript',
'alanning:roles',
'mongo'
], both)
api.addFiles('roles/tests/serverAsync.js', 'server')
api.addFiles('roles/tests/client.js', 'client')
api.addFiles('roles/tests/clientAsync.js', 'client')
})