forked from iron-meteor/iron-router
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.js
77 lines (62 loc) · 2.75 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
Package.describe({
summary: 'Routing specifically designed for Meteor'
});
Package.on_use(function (api) {
api.use('reactive-dict', ['client', 'server']);
api.use('deps', ['client', 'server']);
api.use('underscore', ['client', 'server']);
api.use('ejson', ['client', 'server']);
api.use('jquery', 'client');
// default ui manager
// use unordered: true becuase of circular dependency
// for helpers
api.use('ui', 'client');
// default ui manager
// unordered: true because blaze-layout package weakly
// depends on iron-router so it can register itself with
// the router. But we still want to pull in the blaze-layout
// package automatically when users add iron-router.
api.use('blaze-layout', 'client', {unordered: true});
api.use('deps-ext');
api.add_files('lib/utils.js', ['client', 'server']);
api.add_files('lib/route.js', ['client', 'server']);
api.add_files('lib/route_controller.js', ['client', 'server']);
api.add_files('lib/router.js', ['client', 'server']);
api.add_files('lib/client/location.js', 'client');
api.add_files('lib/client/router.js', 'client');
api.add_files('lib/client/wait_list.js', 'client');
api.add_files('lib/client/hooks.js', 'client');
api.add_files('lib/client/route_controller.js', 'client');
api.add_files('lib/client/ui/helpers.js', 'client');
api.add_files('lib/server/route_controller.js', 'server');
api.add_files('lib/server/router.js', 'server');
api.use('webapp', 'server');
Npm.depends({connect: '2.9.0'});
api.export('RouteController', ['client', 'server']);
api.export('Route', ['client', 'server']);
api.export('Router', ['client', 'server']);
api.export('IronLocation', 'client');
api.export('Utils', ['client', 'server'], {testOnly: true});
api.export('IronRouter', ['client', 'server'], {testOnly: true});
api.export('WaitList', 'client', {testOnly: true});
});
Package.on_test(function (api) {
api.use('iron-router', ['client', 'server']);
api.use('tinytest', ['client', 'server']);
api.use('test-helpers', ['client', 'server']);
api.use('reactive-dict', ['client', 'server']);
api.use('deps-ext', 'client');
api.add_files('test/test_helpers.js', ['client', 'server']);
// client and server
api.add_files('test/both/route.js', ['client', 'server']);
api.add_files('test/both/route_controller.js', ['client', 'server']);
api.add_files('test/both/router.js', ['client', 'server']);
api.add_files('test/both/utils.js', ['client', 'server']);
// server only
api.add_files('test/server/router.js', 'server');
// client only
api.add_files('test/client/mocks.js', 'client');
api.add_files('test/client/router.js', 'client');
api.add_files('test/client/route_controller.js', 'client');
api.add_files('test/client/wait_list.js', 'client');
});