Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert rocketchat-sandstorm to main module structure #12799

Merged
merged 2 commits into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/rocketchat-sandstorm/client/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import './powerboxListener';
import './setPath';
1 change: 1 addition & 0 deletions packages/rocketchat-sandstorm/client/powerboxListener.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';

RocketChat.Sandstorm = RocketChat.Sandstorm || {};

Expand Down
12 changes: 8 additions & 4 deletions packages/rocketchat-sandstorm/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,12 @@ Package.describe({
});

Package.onUse(function(api) {
api.use(['ecmascript', 'rocketchat:lib', 'jalik:ufs', 'kadira:flow-router']);

api.addFiles(['server/lib.js', 'server/events.js', 'server/powerbox.js'], 'server');
api.addFiles(['client/powerboxListener.js', 'client/setPath.js'], 'client');
api.use([
'ecmascript',
'rocketchat:lib',
'jalik:ufs',
'kadira:flow-router',
]);
api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});
3 changes: 2 additions & 1 deletion packages/rocketchat-sandstorm/server/events.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* globals getHttpBridge, waitPromise */
import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';
import { getHttpBridge, waitPromise } from './lib';
import _ from 'underscore';

RocketChat.Sandstorm.notify = function() {};
Expand Down
3 changes: 3 additions & 0 deletions packages/rocketchat-sandstorm/server/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import './lib';
import './events';
import './powerbox';
7 changes: 5 additions & 2 deletions packages/rocketchat-sandstorm/server/lib.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
/* globals getHttpBridge, waitPromise, UploadFS */
/* exported getHttpBridge, waitPromise */
import Future from 'fibers/future';
import { RocketChat } from 'meteor/rocketchat:lib';
import { UploadFS } from 'meteor/jalik:ufs';

RocketChat.Sandstorm = {};

export let getHttpBridge;
export let waitPromise;

if (process.env.SANDSTORM === '1') {
const Capnp = require('capnp');
const { SandstormHttpBridge } = Capnp.importSystem('sandstorm/sandstorm-http-bridge.capnp');
Expand Down
5 changes: 3 additions & 2 deletions packages/rocketchat-sandstorm/server/powerbox.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* globals getHttpBridge, waitPromise */

import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';
import { getHttpBridge, waitPromise } from './lib';

RocketChat.Sandstorm.offerUiView = function() {};

if (process.env.SANDSTORM === '1') {
Expand Down