Skip to content

Commit aa076bc

Browse files
committed
Updated for Meteor 1.2.x and fixed routing links to static assets
1 parent 1a8a61b commit aa076bc

File tree

7 files changed

+133
-101
lines changed

7 files changed

+133
-101
lines changed

Diff for: .meteor/.finished-upgraders

+4
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,7 @@ notices-for-0.9.0
66
notices-for-0.9.1
77
0.9.4-platform-file
88
notices-for-facebook-graph-api-2
9+
1.2.0-standard-minifiers-package
10+
1.2.0-meteor-platform-split
11+
1.2.0-cordova-changes
12+
1.2.0-breaking-changes

Diff for: .meteor/packages

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ momentjs:moment
1616
meteorhacks:npm
1717
meteorhacks:flow-router
1818
meteorhacks:flow-layout
19-
npm-container
19+
standard-minifiers
20+
21+
22+
npm-container

Diff for: .meteor/release

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
METEOR@1.1.0.2
1+
METEOR@1.2.1

Diff for: .meteor/versions

+82-66
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,88 @@
1-
2-
3-
4-
5-
6-
1+
2+
3+
4+
5+
6+
7+
8+
79
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-
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+
3545
meteorhacks:[email protected]
3646
meteorhacks:[email protected]
3747
meteorhacks:[email protected]
38-
meteorhacks:[email protected]
39-
40-
41-
42-
43-
48+
meteorhacks:[email protected]
49+
50+
51+
52+
53+
54+
4455
4556
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-
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+

Diff for: packages/npm-container/index.js

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
Meteor.npmRequire = function(moduleName) { // 85
2-
var module = Npm.require(moduleName); // 86
3-
return module; // 87
4-
}; // 88
5-
// 89
6-
Meteor.require = function(moduleName) { // 90
7-
console.warn('Meteor.require is deprecated. Please use Meteor.npmRequire instead!'); // 91
8-
return Meteor.npmRequire(moduleName); // 92
9-
}; // 93
1+
Meteor.npmRequire = function(moduleName) {
2+
var module = Npm.require(moduleName);
3+
return module;
4+
};
5+
6+
Meteor.require = function(moduleName) {
7+
console.warn('Meteor.require is deprecated. Please use Meteor.npmRequire instead!');
8+
return Meteor.npmRequire(moduleName);
9+
};

Diff for: packages/npm-container/package.js

+30-21
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,30 @@
1-
var path = Npm.require('path'); // 97
2-
var fs = Npm.require('fs'); // 98
3-
// 99
4-
Package.describe({ // 100
5-
summary: 'Contains all your npm dependencies', // 101
6-
version: '1.0.0', // 102
7-
name: 'npm-container' // 103
8-
}); // 104
9-
// 105
10-
var packagesJsonFile = path.resolve('./packages.json'); // 106
11-
try { // 107
12-
var fileContent = fs.readFileSync(packagesJsonFile); // 108
13-
var packages = JSON.parse(fileContent.toString()); // 109
14-
Npm.depends(packages); // 110
15-
} catch(ex) { // 111
16-
console.error('ERROR: packages.json parsing error [ ' + ex.message + ' ]'); // 112
17-
} // 113
18-
// 114
19-
Package.onUse(function(api) { // 115
20-
api.add_files(['index.js', '../../packages.json'], 'server'); // 116
21-
}); // 117
1+
var path = Npm.require('path');
2+
var fs = Npm.require('fs');
3+
4+
Package.describe({
5+
summary: 'Contains all your npm dependencies',
6+
version: '1.2.0',
7+
name: 'npm-container'
8+
});
9+
10+
var packagesJsonFile = path.resolve('./packages.json');
11+
try {
12+
var fileContent = fs.readFileSync(packagesJsonFile);
13+
var packages = JSON.parse(fileContent.toString());
14+
Npm.depends(packages);
15+
} catch (ex) {
16+
console.error('ERROR: packages.json parsing error [ ' + ex.message + ' ]');
17+
}
18+
19+
// Adding the app's packages.json as a used file for this package will get
20+
// Meteor to watch it and reload this package when it changes
21+
Package.onUse(function(api) {
22+
api.addFiles('index.js', 'server');
23+
if (api.addAssets) {
24+
api.addAssets('../../packages.json', 'server');
25+
} else {
26+
api.addFiles('../../packages.json', 'server', {
27+
isAsset: true
28+
});
29+
}
30+
});

Diff for: sample.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ <h3>fileCollection + jobCollection Test App</h3>
4848
<div class="thumbnail">
4949
{{#if isImage}}
5050
{{#if thumb}}
51-
<a href="{{../baseURL}}/id/{{id}}"><img class="img-thumbnail" alt="{{altMessage}}" src="{{../baseURL}}/id/{{thumb}}"></a>
51+
<a href="{{../baseURL}}/id/{{id}}" target="_self"><img class="img-thumbnail" alt="{{altMessage}}" src="{{../baseURL}}/id/{{thumb}}"></a>
5252
{{else}}
53-
<a href="{{../baseURL}}/id/{{id}}"><img class="img-thumbnail" alt="{{altMessage}}" src=""></a>
53+
<a href="{{../baseURL}}/id/{{id}}" target="_self"><img class="img-thumbnail" alt="{{altMessage}}" src=""></a>
5454
{{/if}}
5555
{{else}}
5656
<span class="text-muted text-center">No preview</span>
@@ -100,7 +100,7 @@ <h3>fileCollection + jobCollection Test App</h3>
100100
{{#each dataEntries}}
101101
<tr>
102102
<td>
103-
<a href="{{../baseURL}}/id/{{id}}?download=true">{{shortFilename 32}}</a>
103+
<a href="{{../baseURL}}/id/{{id}}?download=true" target="_self">{{shortFilename 32}}</a>
104104
<button type="button" class="close del-file" aria-hidden="true">&times;</button>
105105
</td>
106106
<td>{{id}}</td>

0 commit comments

Comments
 (0)