This repository has been archived by the owner on Sep 18, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
/
package.js
65 lines (55 loc) · 1.86 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
Package.describe({
name: 'cosmos:browserify',
version: '0.10.0',
summary: 'Bundle NPM modules for client side with Browserify',
git: 'https://github.com/elidoran/cosmos-browserify.git',
documentation: 'README.md'
});
Package.registerBuildPlugin({
name: "CosmosBrowserify",
// need 'meteor' for Npm and Meteor.wrapAsync
sources: ['plugin/browserify.coffee'],
npmDependencies: {
"browserify": "12.0.1" // primary tool which actually does the browserify
, "envify":"3.4.0" // transforms process.env values
, "exorcist-stream":"0.4.0" // gets source map from source (forked version for streaming)
, "strung":"1.0.4" // acts as a readable/writable/duplex
, "json-stringify-safe":"5.0.1"
}
});
// Need these so they're available during testing :(
// the list of them in Package.registerBuildPlugin doesn't do it...
// because plugin goes to .npm/plugin/CosmosBrowserify and these to: .npm/package
// I'm using a symlink so there's only one copy of them.
Npm.depends({
"browserify": "12.0.1"
, "envify":"3.4.0"
, "exorcist-stream":"0.4.0"
, "strung":"1.0.4"
, "json-stringify-safe":"5.0.1"
});
// Need this for the 'isobuild:compiler-plugin'
Package.onUse(function (api) {
// no longer backwards compatible (just has to be)
api.versionsFrom('1.2');
api.use([
'isobuild:[email protected]'
], 'server');
});
Package.onTest(function(api) {
api.use([
'tinytest',
'coffeescript',
'underscore' ,
'cosmos:browserify'
], 'server');
api.addFiles([
// mock things we aren't able to get in our test environment.
'test/mocks.coffee',
// add our plugin, again, so we can get at the class
'plugin/browserify.coffee',
// the tests
'test/browserify-tests.coffee'
], 'server');
});