forked from lookback/meteor-tooltips
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.js
34 lines (30 loc) · 1.07 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
const fs = Npm.require("fs");
const path = Npm.require("path");
// try to obtain package metadata from package.json ; it's much easier to manage the version number this way
// TODO: try to find a better way to obtain package metadata from package.json ; currently relying on a non-public _packageSource
const packageJSON = JSON.parse(fs.readFileSync(path.join(Package._packageSource.sourceRoot, "package.json")));
const { description, version, repository } = packageJSON;
Package.describe({
name: "cunneen:tooltips",
summary: description || "Reactive tooltips, no coffee required.",
version: version || "1.0.1",
git: repository || "https://github.com/cunneen/meteor-tooltips.git",
});
Package.onUse(function (api) {
api.use(
[
"[email protected] || 3.0.0",
],
"client"
);
const distDir = "dist";
api.addFiles(
["tooltips.html", "lodashUtils.js"].map((f) => `${distDir}/${f}`),
"client"
);
api.mainModule(`${distDir}/tooltips.js`, "client");
});