Properly export constants using named exports - v8 (#871)

* Properly export constants so they can be imported using named imports which are present throughout the lib.

* run grunt
This commit is contained in:
Jacob
2016-11-05 07:21:02 -04:00
committed by Amish Shah
parent af0663e915
commit 780cbadd79
2 changed files with 12 additions and 8 deletions

View File

@@ -4,8 +4,10 @@ exports.__esModule = true;
var Constants = {};
var API = Constants.API = "https://discordapp.com/api";
exports.API = API;
var CDN = Constants.CDN = "https://cdn.discordapp.com";
exports.CDN = CDN;
var Endpoints = Constants.Endpoints = {
// general endpoints
LOGIN: API + "/auth/login",
@@ -117,7 +119,8 @@ var Endpoints = Constants.Endpoints = {
FRIENDS: API + "/users/@me/relationships"
};
Constants.Permissions = {
exports.Endpoints = Endpoints;
var Permissions = Constants.Permissions = {
// general
createInstantInvite: 1 << 0,
kickMembers: 1 << 1,
@@ -149,7 +152,8 @@ Constants.Permissions = {
};
Constants.PacketType = {
exports.Permissions = Permissions;
var PacketType = Constants.PacketType = {
CHANNEL_CREATE: "CHANNEL_CREATE",
CHANNEL_DELETE: "CHANNEL_DELETE",
CHANNEL_UPDATE: "CHANNEL_UPDATE",
@@ -181,5 +185,5 @@ Constants.PacketType = {
FRIEND_REMOVE: "RELATIONSHIP_REMOVE"
};
exports.PacketType = PacketType;
exports["default"] = Constants;
module.exports = exports["default"];