-
Notifications
You must be signed in to change notification settings - Fork 150
/
Copy pathpackage.js
39 lines (31 loc) · 1.11 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
// package metadata file for Meteor.js
'use strict';
// https://atmospherejs.com/sdecima/javascript-detect-element-resize
var packageName = 'sdecima:javascript-detect-element-resize';
var where = 'client'; // where to install: 'client' or 'server'. For both, pass nothing.
var packageJson = JSON.parse(Npm.require("fs").readFileSync('package.json'));
Package.describe({
name: packageName,
summary: 'Official. Efficient cross-browser, event-based, element resize detection',
version: packageJson.version,
git: 'https://github.com/sdecima/javascript-detect-element-resize'
});
Package.onUse(function (api) {
api.versionsFrom(['[email protected]', '[email protected]']);
/*
* The library doesn't require jQuery; in theory we should only run the jQuery code if
* jQuery is detected, but since jquery is a core Meteor package (for now), we always
* attach it
*/
api.use('jquery', 'client');
api.addFiles([
'detect-element-resize.js',
'jquery.resize.js'
], where
);
});
Package.onTest(function (api) {
api.use(packageName, where);
api.use('tinytest', where);
api.addFiles('meteor/test.js', where);
});