diff --git a/packages/rocketchat-token-login/client/index.js b/packages/rocketchat-token-login/client/index.js new file mode 100644 index 000000000000..39583e0afa4a --- /dev/null +++ b/packages/rocketchat-token-login/client/index.js @@ -0,0 +1 @@ +import './login_token_client'; diff --git a/packages/rocketchat-token-login/package.js b/packages/rocketchat-token-login/package.js index 858c93028426..4f7c7812c1f4 100644 --- a/packages/rocketchat-token-login/package.js +++ b/packages/rocketchat-token-login/package.js @@ -5,20 +5,14 @@ Package.describe({ }); Package.onUse(function(api) { - - // Server libs - api.use('rocketchat:logger', 'server'); - - api.use('kadira:flow-router', 'client'); - api.use('kadira:blaze-layout', 'client'); - - api.use('rocketchat:lib'); - api.use('accounts-base'); - api.use('ecmascript'); - - // Server files - api.addFiles('server/login_token_server.js', 'server'); - - // Client files - api.addFiles('client/login_token_client.js', 'client'); + api.use([ + 'ecmascript', + 'accounts-base', + 'kadira:flow-router', + 'kadira:blaze-layout', + 'rocketchat:lib', + 'rocketchat:logger', + ]); + api.mainModule('client/index.js', 'client'); + api.mainModule('server/index.js', 'server'); }); diff --git a/packages/rocketchat-token-login/server/index.js b/packages/rocketchat-token-login/server/index.js new file mode 100644 index 000000000000..3cb9f1aac0b5 --- /dev/null +++ b/packages/rocketchat-token-login/server/index.js @@ -0,0 +1 @@ +import './login_token_server'; diff --git a/packages/rocketchat-token-login/server/login_token_server.js b/packages/rocketchat-token-login/server/login_token_server.js index d46fe4a05ca6..bb3f654b33b4 100644 --- a/packages/rocketchat-token-login/server/login_token_server.js +++ b/packages/rocketchat-token-login/server/login_token_server.js @@ -1,5 +1,5 @@ -/* globals Accounts */ import { Meteor } from 'meteor/meteor'; +import { Accounts } from 'meteor/accounts-base'; Accounts.registerLoginHandler('login-token', function(result) { if (!result.loginToken) {