diff --git a/packages/rocketchat-channel-settings-mail-messages/client/index.js b/packages/rocketchat-channel-settings-mail-messages/client/index.js new file mode 100644 index 000000000000..82a489dbed7e --- /dev/null +++ b/packages/rocketchat-channel-settings-mail-messages/client/index.js @@ -0,0 +1,3 @@ +import './lib/startup'; +import './views/mailMessagesInstructions.html'; +import './views/mailMessagesInstructions'; diff --git a/packages/rocketchat-channel-settings-mail-messages/client/lib/startup.js b/packages/rocketchat-channel-settings-mail-messages/client/lib/startup.js index a1308a4aefe1..d255479029d7 100644 --- a/packages/rocketchat-channel-settings-mail-messages/client/lib/startup.js +++ b/packages/rocketchat-channel-settings-mail-messages/client/lib/startup.js @@ -1,5 +1,6 @@ // import resetSelection from '../resetSelection'; import { Meteor } from 'meteor/meteor'; +import { RocketChat } from 'meteor/rocketchat:lib'; Meteor.startup(() => { RocketChat.TabBar.addButton({ diff --git a/packages/rocketchat-channel-settings-mail-messages/client/views/mailMessagesInstructions.js b/packages/rocketchat-channel-settings-mail-messages/client/views/mailMessagesInstructions.js index f83f02603e2f..1e8dd5ff2ff2 100644 --- a/packages/rocketchat-channel-settings-mail-messages/client/views/mailMessagesInstructions.js +++ b/packages/rocketchat-channel-settings-mail-messages/client/views/mailMessagesInstructions.js @@ -1,10 +1,12 @@ -/* global Deps */ import { Meteor } from 'meteor/meteor'; import { ReactiveVar } from 'meteor/reactive-var'; import { Blaze } from 'meteor/blaze'; import { Session } from 'meteor/session'; import { Template } from 'meteor/templating'; import { AutoComplete } from 'meteor/mizzao:autocomplete'; +import { RocketChat, handleError } from 'meteor/rocketchat:lib'; +import { t, ChatRoom } from 'meteor/rocketchat:ui'; +import { Deps } from 'meteor/deps'; import toastr from 'toastr'; import resetSelection from '../resetSelection'; diff --git a/packages/rocketchat-channel-settings-mail-messages/package.js b/packages/rocketchat-channel-settings-mail-messages/package.js index 3e363bf13460..946ffd68a559 100644 --- a/packages/rocketchat-channel-settings-mail-messages/package.js +++ b/packages/rocketchat-channel-settings-mail-messages/package.js @@ -16,16 +16,6 @@ Package.onUse(function(api) { 'mizzao:autocomplete', 'mongo', ]); - - api.addFiles([ - 'client/lib/startup.js', - 'client/views/mailMessagesInstructions.html', - 'client/views/mailMessagesInstructions.js', - ], 'client'); - - - api.addFiles([ - 'server/lib/startup.js', - 'server/methods/mailMessages.js', - ], 'server'); + api.mainModule('client/index.js', 'client'); + api.mainModule('server/index.js', 'server'); }); diff --git a/packages/rocketchat-channel-settings-mail-messages/server/index.js b/packages/rocketchat-channel-settings-mail-messages/server/index.js new file mode 100644 index 000000000000..465e185b386a --- /dev/null +++ b/packages/rocketchat-channel-settings-mail-messages/server/index.js @@ -0,0 +1,2 @@ +import './lib/startup'; +import './methods/mailMessages'; diff --git a/packages/rocketchat-channel-settings-mail-messages/server/lib/startup.js b/packages/rocketchat-channel-settings-mail-messages/server/lib/startup.js index cd30fd18c0d1..80c7f8e63595 100644 --- a/packages/rocketchat-channel-settings-mail-messages/server/lib/startup.js +++ b/packages/rocketchat-channel-settings-mail-messages/server/lib/startup.js @@ -1,4 +1,5 @@ import { Meteor } from 'meteor/meteor'; +import { RocketChat } from 'meteor/rocketchat:lib'; Meteor.startup(function() { const permission = { diff --git a/packages/rocketchat-channel-settings-mail-messages/server/methods/mailMessages.js b/packages/rocketchat-channel-settings-mail-messages/server/methods/mailMessages.js index 90b758f21a9a..1ad34a81a0f8 100644 --- a/packages/rocketchat-channel-settings-mail-messages/server/methods/mailMessages.js +++ b/packages/rocketchat-channel-settings-mail-messages/server/methods/mailMessages.js @@ -1,5 +1,6 @@ import { Meteor } from 'meteor/meteor'; import { Match, check } from 'meteor/check'; +import { RocketChat } from 'meteor/rocketchat:lib'; import _ from 'underscore'; import moment from 'moment'; import * as Mailer from 'meteor/rocketchat:mailer';