Convert rocketchat-sandstorm to main module structure (#12799)

pull/12828/head
Marcos Spessatto Defendi 7 years ago committed by Rodrigo Nascimento
parent df054a459e
commit edc48c292c
  1. 2
      packages/rocketchat-sandstorm/client/index.js
  2. 1
      packages/rocketchat-sandstorm/client/powerboxListener.js
  3. 12
      packages/rocketchat-sandstorm/package.js
  4. 3
      packages/rocketchat-sandstorm/server/events.js
  5. 3
      packages/rocketchat-sandstorm/server/index.js
  6. 7
      packages/rocketchat-sandstorm/server/lib.js
  7. 5
      packages/rocketchat-sandstorm/server/powerbox.js

@ -0,0 +1,2 @@
import './powerboxListener';
import './setPath';

@ -1,4 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';
RocketChat.Sandstorm = RocketChat.Sandstorm || {};

@ -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');
});

@ -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() {};

@ -0,0 +1,3 @@
import './lib';
import './events';
import './powerbox';

@ -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');

@ -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') {

Loading…
Cancel
Save