Skip to content

Commit

Permalink
Convert rocketchat-slashcommands-kick to main module structure (#12817)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosSpessatto authored and rodrigok committed Dec 4, 2018
1 parent 9f1dc30 commit 1d10422
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 2 additions & 0 deletions packages/rocketchat-slashcommands-kick/client/client.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { RocketChat } from 'meteor/rocketchat:lib';

RocketChat.slashCommands.add('kick', function(command, params) {
const username = params.trim();
if (username === '') {
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-slashcommands-kick/client/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './client';
8 changes: 3 additions & 5 deletions packages/rocketchat-slashcommands-kick/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ Package.onUse(function(api) {
'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');
});
1 change: 1 addition & 0 deletions packages/rocketchat-slashcommands-kick/server/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './server';
1 change: 1 addition & 0 deletions packages/rocketchat-slashcommands-kick/server/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,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';

const Kick = function(command, params, { rid }) {
if (command !== 'kick' || !Match.test(params, String)) {
Expand Down

0 comments on commit 1d10422

Please sign in to comment.