Skip to content

Commit 7c05159

Browse files
committed
New option Vue.config.meteor.freeze
1 parent 7fe69e4 commit 7c05159

File tree

8 files changed

+56
-41
lines changed

8 files changed

+56
-41
lines changed

.meteor/packages

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66

77
meteor-base@1.0.4 # Packages every Meteor app needs to have
88
mobile-experience@1.0.4 # Packages for a great mobile UX
9-
mongo@1.1.12-6-beta.12 # The database Meteor supports right now
10-
reactive-var@1.0.11-beta.12 # Reactive variable for tracker
11-
jquery@1.11.10-beta.12 # Helpful client-side library
12-
tracker@1.1.1-beta.12 # Meteor's client-side reactive programming library
9+
mongo@1.1.12-6-rc.0 # The database Meteor supports right now
10+
reactive-var@1.0.11-rc.0 # Reactive variable for tracker
11+
jquery@1.11.10-rc.0 # Helpful client-side library
12+
tracker@1.1.1-rc.0 # Meteor's client-side reactive programming library
1313

1414
standard-minifier-css@1.3.1 # CSS minifier run for production mode
15-
standard-minifier-js@1.2.1-beta.12 # JS minifier run for production mode
16-
es5-shim@4.6.15-beta.12 # ECMAScript 5 compatibility for older browsers.
17-
ecmascript@0.5.9-beta.12 # Enable ECMAScript2015+ syntax in app code
15+
standard-minifier-js@1.2.1-rc.0 # JS minifier run for production mode
16+
es5-shim@4.6.15-rc.0 # ECMAScript 5 compatibility for older browsers.
17+
ecmascript@0.5.9-rc.0 # Enable ECMAScript2015+ syntax in app code
1818

1919
static-html@1.1.12_1
20-
check@1.2.4-beta.12
20+
check@1.2.4-rc.0
2121

2222
apollo
2323

.meteor/release

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
METEOR@1.4.2-beta.12
1+
METEOR@1.4.2-rc.0

.meteor/versions

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
accounts-base@1.2.11
1+
accounts-base@1.2.12_1
22
akryum:npm-check@0.0.3
3-
akryum:vue@1.1.0
3+
akryum:vue@1.2.0
44
akryum:vue-coffee@0.0.2
55
akryum:vue-component@0.7.7
66
akryum:vue-component-dev-client@0.2.1
@@ -14,67 +14,67 @@ akryum:vue-sass@0.0.4
1414
akryum:vue-stylus@0.0.4
1515
akryum:vuex@0.4.1
1616
allow-deny@1.0.5
17-
apollo@0.1.1
17+
apollo@0.1.2
1818
autoupdate@1.3.11
19-
babel-compiler@6.13.0-beta.12
20-
babel-runtime@0.1.12-beta.12
21-
base64@1.0.10-beta.12
19+
babel-compiler@6.13.0-rc.0
20+
babel-runtime@0.1.12-rc.0
21+
base64@1.0.10-rc.0
2222
binary-heap@1.0.9
2323
blaze@2.1.9
2424
blaze-tools@1.0.10
2525
boilerplate-generator@1.0.10
26-
caching-compiler@1.1.7
26+
caching-compiler@1.1.7_1
2727
caching-html-compiler@1.0.7
2828
callback-hook@1.0.9
2929
ccorcos:subs-cache@0.1.0
30-
check@1.2.4-beta.12
30+
check@1.2.4-rc.0
3131
chuangbo:cookie@1.1.0
32-
coffeescript@1.2.4_1
32+
coffeescript@1.2.4_2
3333
ddp@1.2.5
34-
ddp-client@1.3.1
34+
ddp-client@1.3.1_1
3535
ddp-common@1.2.6
3636
ddp-rate-limiter@1.0.5
37-
ddp-server@1.3.10
37+
ddp-server@1.3.10_1
3838
deps@1.0.12
3939
diff-sequence@1.0.6
40-
ecmascript@0.5.9-beta.12
41-
ecmascript-runtime@0.3.15-beta.12
42-
ejson@1.0.13-beta.12
43-
es5-shim@4.6.15-beta.12
40+
ecmascript@0.5.9-rc.0
41+
ecmascript-runtime@0.3.15-rc.0
42+
ejson@1.0.13-rc.0
43+
es5-shim@4.6.15-rc.0
4444
fastclick@1.0.12
4545
geojson-utils@1.0.9
4646
hot-code-push@1.0.4
4747
html-tools@1.0.11
4848
htmljs@1.0.11
49-
http@1.2.9
49+
http@1.2.9_1
5050
id-map@1.0.8
51-
jquery@1.11.10-beta.12
51+
jquery@1.11.10-rc.0
5252
launch-screen@1.0.12
5353
livedata@1.0.18
5454
localstorage@1.0.11
5555
logging@1.1.15_1
56-
meteor@1.2.18-beta.12
56+
meteor@1.2.18-rc.0
5757
meteor-base@1.0.4
5858
meteorhacks:fast-render@2.16.0
5959
meteorhacks:inject-data@2.0.0
6060
meteorhacks:meteorx@1.4.1
6161
meteorhacks:picker@1.0.3
62-
minifier-css@1.2.14
63-
minifier-js@1.2.15-beta.12
62+
minifier-css@1.2.14_1
63+
minifier-js@1.2.15-rc.0
6464
minimongo@1.0.17
6565
mobile-experience@1.0.4
6666
mobile-status-bar@1.0.12
67-
modules@0.7.7-beta.12
68-
modules-runtime@0.7.7-beta.12
69-
mongo@1.1.12_1
67+
modules@0.7.7-rc.0
68+
modules-runtime@0.7.7-rc.0
69+
mongo@1.1.12_5
7070
mongo-id@1.0.5
71-
npm-mongo@1.5.49
72-
observe-sequence@1.0.12
71+
npm-mongo@2.2.10_1
72+
observe-sequence@1.0.13
7373
ordered-dict@1.0.8
74-
promise@0.8.8-beta.12
74+
promise@0.8.8-rc.0
7575
random@1.0.10
7676
rate-limit@1.0.5
77-
reactive-var@1.0.11-beta.12
77+
reactive-var@1.0.11-rc.0
7878
reload@1.1.10
7979
retry@1.0.8
8080
routepolicy@1.0.11
@@ -83,13 +83,13 @@ shell-server@0.2.1
8383
spacebars@1.0.13
8484
spacebars-compiler@1.0.13
8585
standard-minifier-css@1.3.1
86-
standard-minifier-js@1.2.1-beta.12
86+
standard-minifier-js@1.2.1-rc.0
8787
static-html@1.1.13
8888
templating-tools@1.0.5
8989
tmeasday:check-npm-versions@0.3.1
90-
tracker@1.1.1-beta.12
90+
tracker@1.1.1-rc.0
9191
ui@1.0.12
92-
underscore@1.0.10-beta.12
92+
underscore@1.0.10-rc.0
9393
url@1.0.10
9494
use-vue-component@0.0.1
9595
webapp@1.3.11_1

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**This project is in beta.**
44

5-
Tested with Meteor 1.4.2-beta.7
5+
Tested with Meteor 1.4.2-rc.0
66

77
This project contains new meteor packages to help build [meteor](http://meteor.com/) apps with first-class [vuejs](http://vuejs.org/) integration as the ui layer.
88

client/main.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Vue.config.meteor.subscribe = function(...args) {
2828
return subsCache.subscribe(...args);
2929
};
3030

31+
Vue.config.meteor.freeze = true;
32+
3133
// Router
3234
const router = new Router({
3335
history: true,

packages/vue/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,15 @@ computed: {
233233
}
234234
```
235235

236+
#### Freezing data
237+
238+
This option will apply `Object.freeze` on the Meteor data to prevent Vue from setting up reactivity on it. This can improve the performance of Vue when rendering large collection lists for example. By default, this option is turned off.
239+
240+
```javascript
241+
// Disable Vue reactivity on Meteor data
242+
Vue.config.meteor.freeze = true;
243+
```
244+
236245
---
237246

238247
## Next steps

packages/vue/package.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package.describe({
22
name: 'akryum:vue',
3-
version: '1.1.0',
3+
version: '1.2.0',
44
summary: 'Integrate Vue with Meteor',
55
git: 'https://github.com/Akryum/meteor-vue-component',
66
documentation: 'README.md'

packages/vue/plugin.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ export default {
1515

1616
Vue.config.meteor = {
1717
subscribe: defaultSubscription,
18+
freeze: false,
1819
};
1920

2021
function prepare() {
@@ -62,6 +63,9 @@ export default {
6263
if (result && typeof result.fetch === 'function') {
6364
result = result.fetch();
6465
}
66+
if(Vue.config.meteor.freeze) {
67+
result = Object.freeze(result);
68+
}
6569
this[key] = result;
6670
});
6771
}

0 commit comments

Comments
 (0)