Skip to content

Commit

Permalink
Move demo-simplest-streaming to ES6
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-dimitru committed Jul 13, 2016
1 parent 3c190bb commit f19d251
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 39 deletions.
1 change: 1 addition & 0 deletions demo-simplest-streaming/.meteor/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
dev_bundle
local
2 changes: 1 addition & 1 deletion demo-simplest-streaming/.meteor/release
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[email protected].1
[email protected].4
46 changes: 23 additions & 23 deletions demo-simplest-streaming/.meteor/versions
Original file line number Diff line number Diff line change
@@ -1,70 +1,70 @@
[email protected]
[email protected].10
[email protected].3
[email protected].11
[email protected].4
[email protected]_1
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].5_1
[email protected].6
[email protected]
[email protected]
[email protected]
[email protected].2_1
[email protected].3
[email protected]
[email protected].8_1
[email protected].9
[email protected]
[email protected].8_1
[email protected].9
[email protected]
[email protected]
[email protected].6_1
[email protected].11_1
[email protected].7
[email protected].12
[email protected]
[email protected].12_1
[email protected].13
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].7
[email protected].8
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].13_1
[email protected].15_1
[email protected].14
[email protected].16
[email protected]
[email protected].12_1
[email protected].12_1
[email protected].13
[email protected].13
[email protected]
[email protected]
[email protected]
[email protected].4
[email protected].4_1
[email protected].5
[email protected].5
[email protected]_1
[email protected]
[email protected].44_1
[email protected].45
[email protected]
[email protected]
ostrio:[email protected]
ostrio:[email protected].2
[email protected].2_1
ostrio:[email protected].4
[email protected].3
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].7_1
[email protected].7_1
[email protected].12_1
[email protected].8
[email protected].8
[email protected].13
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected].9_1
[email protected].10
[email protected]
2 changes: 1 addition & 1 deletion demo-simplest-streaming/client/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Template } from 'meteor/templating';

import { Videos, Images } from '../lib/files.collections.js';
import './main.html';

Template.file.helpers({
Expand Down
25 changes: 12 additions & 13 deletions demo-simplest-streaming/lib/files.collections.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
this.Images = new Meteor.Files({
import { FilesCollection } from 'meteor/ostrio:files';

let Images = new FilesCollection({
debug: true,
collectionName: 'Images',
onBeforeUpload: function () {
onBeforeUpload() {
// Disallow uploads from client
return false;
}
});

this.Videos = new Meteor.Files({
let Videos = new FilesCollection({
debug: true,
collectionName: 'Videos',
onBeforeUpload: function () {
onBeforeUpload() {
// Disallow uploads from client
return false;
}
Expand All @@ -21,7 +23,7 @@ if (Meteor.isServer) {
Images.denyClient();
Videos.denyClient();

Meteor.startup(function () {
Meteor.startup(() => {
if (!Images.findOne()) {
Images.load('https://raw.githubusercontent.com/VeliovGroup/Meteor-Files/master/logo.png', {
fileName: 'logo.png'
Expand All @@ -35,16 +37,13 @@ if (Meteor.isServer) {
}
});

Meteor.publish('files.images.all', function () {
return Images.find().cursor;
});

Meteor.publish('files.videos.all', function () {
return Videos.find().cursor;
});
Meteor.publish('files.images.all', () => Images.find().cursor);
Meteor.publish('files.videos.all', () => Videos.find().cursor);

} else {

Meteor.subscribe('files.images.all');
Meteor.subscribe('files.videos.all');
}
}

export { Videos, Images }
2 changes: 1 addition & 1 deletion demo/.meteor/versions
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ [email protected]
[email protected]
ostrio:[email protected]
ostrio:[email protected]
ostrio:[email protected].3
ostrio:[email protected].4
ostrio:[email protected]
ostrio:[email protected]
ostrio:[email protected]
Expand Down

0 comments on commit f19d251

Please sign in to comment.