forked from iron-meteor/iron-router
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.js
95 lines (82 loc) · 1.89 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
91
92
93
94
95
Package.describe({
summary: 'Routing specifically designed for Meteor'
});
Package.on_use(function (api) {
api.use([
'meteor',
'deps',
'underscore',
'ejson'
], ['client', 'server']);
api.use([
'templating',
'handlebars',
'universal-events'
], 'client');
api.add_files([
'license.js',
'lib/router_utils.js',
'lib/route_path.js',
'lib/route_context.js',
'lib/route.js',
'lib/route_controller.js',
'lib/router.js'
], ['client', 'server']);
api.add_files([
'lib/client/location.js',
'lib/client/yield_partials_dict.js',
'lib/client/client_router.js',
'lib/client/default_layout.html',
'lib/client/route_controller.js',
'lib/client/helpers.js'
], 'client');
api.add_files([
'lib/server/route_controller.js',
'lib/server/server_router.js'
], 'server');
// for backward compat before Meteor linker changes
if (typeof api.export !== 'undefined') {
api.use('webapp', 'server');
Npm.depends({connect: '2.7.10'});
api.export([
'RouteContext',
'Route',
'IronRouter',
'RouteController',
'Router'
], ['client', 'server']);
api.export([
'Location',
'ClientRouter'
], 'client');
api.export([
'ServerRouter'
], 'server');
api.export([
'RouterUtils',
'RoutePath',
], 'client', {testOnly: true});
}
});
Package.on_test(function (api) {
api.use([
'iron-router',
'tinytest',
'test-helpers',
'templating',
'reactive-dict'
], ['client']);
api.add_files([
'test/test_helpers.js',
'test/router_utils_test.js',
'test/route_path_test.js',
'test/route_context_test.js',
'test/route_test.js',
'test/router_test.js',
], ['client']);
api.add_files([
'test/client/test_templates.html',
'test/client/route_controller_test.js',
'test/client/client_router_test.js'
], 'client');
});