Skip to content

Commit

Permalink
Convert tocketchat-mapview to main module structure (#12701)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcosSpessatto authored and rodrigok committed Dec 3, 2018
1 parent bbc964e commit 1e7e9b1
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions packages/rocketchat-mapview/client/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './mapview';
1 change: 1 addition & 0 deletions packages/rocketchat-mapview/client/mapview.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { TAPi18n } from 'meteor/tap:i18n';
import { RocketChat } from 'meteor/rocketchat:lib';
/*
* MapView is a named function that will replace geolocation in messages with a Google Static Map
* @param {Object} message - The message object
Expand Down
8 changes: 3 additions & 5 deletions packages/rocketchat-mapview/package.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,8 @@ Package.onUse(function(api) {
api.use([
'ecmascript',
'rocketchat:lib',
'tap:i18n',
]);

api.addFiles('server/settings.js', 'server');

api.addFiles('client/mapview.js', 'client');

api.mainModule('client/index.js', 'client');
api.mainModule('server/index.js', 'server');
});
1 change: 1 addition & 0 deletions packages/rocketchat-mapview/server/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import './settings';
1 change: 1 addition & 0 deletions packages/rocketchat-mapview/server/settings.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Meteor } from 'meteor/meteor';
import { RocketChat } from 'meteor/rocketchat:lib';

Meteor.startup(function() {
RocketChat.settings.add('MapView_Enabled', false, { type: 'boolean', group: 'Message', section: 'Google Maps', public: true, i18nLabel: 'MapView_Enabled', i18nDescription: 'MapView_Enabled_Description' });
Expand Down

0 comments on commit 1e7e9b1

Please sign in to comment.