From efb3169938021ab84f40db9dd4bafb8cc1e95653 Mon Sep 17 00:00:00 2001 From: Marcos Defendi Date: Thu, 1 Nov 2018 18:07:13 -0300 Subject: [PATCH] Convert rocketchat-assets to main module structure --- packages/rocketchat-assets/package.js | 2 +- packages/rocketchat-assets/server/assets.js | 6 ++++-- packages/rocketchat-assets/server/index.js | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 packages/rocketchat-assets/server/index.js diff --git a/packages/rocketchat-assets/package.js b/packages/rocketchat-assets/package.js index be683753e1d7c..79b76ed1c1c82 100644 --- a/packages/rocketchat-assets/package.js +++ b/packages/rocketchat-assets/package.js @@ -14,5 +14,5 @@ Package.onUse(function(api) { 'webapp-hashing', ]); - api.addFiles('server/assets.js', 'server'); + api.mainModule('server/index.js', 'server'); }); diff --git a/packages/rocketchat-assets/server/assets.js b/packages/rocketchat-assets/server/assets.js index b79fbce2e03f0..7f41d6624b2d8 100644 --- a/packages/rocketchat-assets/server/assets.js +++ b/packages/rocketchat-assets/server/assets.js @@ -1,8 +1,10 @@ -/* global WebAppHashing, WebAppInternals */ import { Meteor } from 'meteor/meteor'; import { WebApp } from 'meteor/webapp'; +import { RocketChat } from 'meteor/rocketchat:lib'; +import { RocketChatFile } from 'meteor/rocketchat:file'; +import { WebAppHashing } from 'meteor/webapp-hashing'; +import { WebAppInternals } from 'meteor/webapp'; import _ from 'underscore'; - import sizeOf from 'image-size'; import mime from 'mime-type/with-db'; import crypto from 'crypto'; diff --git a/packages/rocketchat-assets/server/index.js b/packages/rocketchat-assets/server/index.js new file mode 100644 index 0000000000000..5b8e85c9ffd47 --- /dev/null +++ b/packages/rocketchat-assets/server/index.js @@ -0,0 +1 @@ +import './assets';