From 685d1648220f17df238d947791c90e61b8b43e9a Mon Sep 17 00:00:00 2001 From: Marcos Spessatto Defendi Date: Tue, 4 Dec 2018 09:42:24 -0200 Subject: [PATCH] Convert rocketchat-slashcommands-inviteall to main module structure (#12815) --- .../rocketchat-slashcommands-inviteall/client/client.js | 2 ++ .../rocketchat-slashcommands-inviteall/client/index.js | 1 + packages/rocketchat-slashcommands-inviteall/package.js | 9 +++------ .../rocketchat-slashcommands-inviteall/server/index.js | 1 + .../rocketchat-slashcommands-inviteall/server/server.js | 1 + 5 files changed, 8 insertions(+), 6 deletions(-) create mode 100644 packages/rocketchat-slashcommands-inviteall/client/index.js create mode 100644 packages/rocketchat-slashcommands-inviteall/server/index.js diff --git a/packages/rocketchat-slashcommands-inviteall/client/client.js b/packages/rocketchat-slashcommands-inviteall/client/client.js index 6ef1afb7f6ff..63cd6219912f 100644 --- a/packages/rocketchat-slashcommands-inviteall/client/client.js +++ b/packages/rocketchat-slashcommands-inviteall/client/client.js @@ -1,3 +1,5 @@ +import { RocketChat } from 'meteor/rocketchat:lib'; + RocketChat.slashCommands.add('invite-all-to', undefined, { description: 'Invite_user_to_join_channel_all_to', params: '#room', diff --git a/packages/rocketchat-slashcommands-inviteall/client/index.js b/packages/rocketchat-slashcommands-inviteall/client/index.js new file mode 100644 index 000000000000..d99e4ed77352 --- /dev/null +++ b/packages/rocketchat-slashcommands-inviteall/client/index.js @@ -0,0 +1 @@ +import './client'; diff --git a/packages/rocketchat-slashcommands-inviteall/package.js b/packages/rocketchat-slashcommands-inviteall/package.js index 0c860b2214ca..9c9c13d165f3 100644 --- a/packages/rocketchat-slashcommands-inviteall/package.js +++ b/packages/rocketchat-slashcommands-inviteall/package.js @@ -6,15 +6,12 @@ Package.describe({ }); Package.onUse(function(api) { - api.use([ 'ecmascript', 'check', 'rocketchat:lib', + 'templating', ]); - - api.use('templating', 'client'); - - api.addFiles('client/client.js', 'client'); - api.addFiles('server/server.js', 'server'); + api.mainModule('client/index.js', 'client'); + api.mainModule('server/index.js', 'server'); }); diff --git a/packages/rocketchat-slashcommands-inviteall/server/index.js b/packages/rocketchat-slashcommands-inviteall/server/index.js new file mode 100644 index 000000000000..1199af15d79f --- /dev/null +++ b/packages/rocketchat-slashcommands-inviteall/server/index.js @@ -0,0 +1 @@ +import './server'; diff --git a/packages/rocketchat-slashcommands-inviteall/server/server.js b/packages/rocketchat-slashcommands-inviteall/server/server.js index fd3a50e40258..db5a84e71ea4 100644 --- a/packages/rocketchat-slashcommands-inviteall/server/server.js +++ b/packages/rocketchat-slashcommands-inviteall/server/server.js @@ -6,6 +6,7 @@ import { Meteor } from 'meteor/meteor'; import { Match } from 'meteor/check'; import { Random } from 'meteor/random'; import { TAPi18n } from 'meteor/tap:i18n'; +import { RocketChat } from 'meteor/rocketchat:lib'; function inviteAll(type) { return function inviteAll(command, params, item) {