mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat(Esm): use gen-esm-wrapper instead of manually making the file (#5700)
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -20,4 +20,7 @@ deploy/deploy_key.pub
|
||||
.idea/
|
||||
docs/docs.json
|
||||
typings/index.js
|
||||
|
||||
# Autogenerated
|
||||
RELEASE_CHANGELOG.md
|
||||
src/index.mjs
|
||||
|
||||
109
esm/discord.mjs
109
esm/discord.mjs
@@ -1,109 +0,0 @@
|
||||
import Discord from '../src/index.js';
|
||||
|
||||
export default Discord;
|
||||
|
||||
export const {
|
||||
BaseClient,
|
||||
Client,
|
||||
Shard,
|
||||
ShardClientUtil,
|
||||
ShardingManager,
|
||||
WebhookClient,
|
||||
ActivityFlags,
|
||||
ApplicationFlags,
|
||||
BitField,
|
||||
Collection,
|
||||
Constants,
|
||||
DataResolver,
|
||||
BaseManager,
|
||||
DiscordAPIError,
|
||||
HTTPError,
|
||||
MessageFlags,
|
||||
Intents,
|
||||
Permissions,
|
||||
Speaking,
|
||||
SnowflakeUtil,
|
||||
Structures,
|
||||
SystemChannelFlags,
|
||||
UserFlags,
|
||||
Util,
|
||||
version,
|
||||
ApplicationCommandManager,
|
||||
BaseGuildEmojiManager,
|
||||
ChannelManager,
|
||||
GuildApplicationCommandManager,
|
||||
GuildBanManager,
|
||||
GuildChannelManager,
|
||||
GuildEmojiManager,
|
||||
GuildEmojiRoleManager,
|
||||
GuildMemberManager,
|
||||
GuildMemberRoleManager,
|
||||
GuildManager,
|
||||
ReactionManager,
|
||||
ReactionUserManager,
|
||||
MessageManager,
|
||||
PresenceManager,
|
||||
RoleManager,
|
||||
UserManager,
|
||||
discordSort,
|
||||
escapeMarkdown,
|
||||
fetchRecommendedShards,
|
||||
resolveColor,
|
||||
verifyString,
|
||||
splitMessage,
|
||||
Application,
|
||||
ApplicationCommand,
|
||||
Base,
|
||||
Activity,
|
||||
APIMessage,
|
||||
BaseGuild,
|
||||
BaseGuildEmoji,
|
||||
BaseGuildVoiceChannel,
|
||||
CategoryChannel,
|
||||
Channel,
|
||||
ClientApplication,
|
||||
ClientUser,
|
||||
Collector,
|
||||
CommandInteraction,
|
||||
DMChannel,
|
||||
Emoji,
|
||||
Guild,
|
||||
GuildAuditLogs,
|
||||
GuildBan,
|
||||
GuildChannel,
|
||||
GuildEmoji,
|
||||
GuildMember,
|
||||
GuildPreview,
|
||||
GuildTemplate,
|
||||
Integration,
|
||||
IntegrationApplication,
|
||||
Interaction,
|
||||
Invite,
|
||||
Message,
|
||||
MessageAttachment,
|
||||
MessageCollector,
|
||||
MessageEmbed,
|
||||
MessageMentions,
|
||||
MessageReaction,
|
||||
NewsChannel,
|
||||
OAuth2Guild,
|
||||
PermissionOverwrites,
|
||||
Presence,
|
||||
ClientPresence,
|
||||
ReactionCollector,
|
||||
ReactionEmoji,
|
||||
RichPresenceAssets,
|
||||
Role,
|
||||
Sticker,
|
||||
StoreChannel,
|
||||
StageChannel,
|
||||
Team,
|
||||
TeamMember,
|
||||
TextChannel,
|
||||
User,
|
||||
VoiceChannel,
|
||||
VoiceRegion,
|
||||
VoiceState,
|
||||
Webhook,
|
||||
WebSocket
|
||||
} = Discord;
|
||||
5680
package-lock.json
generated
5680
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
@@ -3,16 +3,11 @@
|
||||
"version": "13.0.0-dev",
|
||||
"description": "A powerful library for interacting with the Discord API",
|
||||
"main": "./src/index.js",
|
||||
"module": "./src/index.mjs",
|
||||
"types": "./typings/index.d.ts",
|
||||
"exports": {
|
||||
".": [
|
||||
{
|
||||
"require": "./src/index.js",
|
||||
"import": "./esm/discord.mjs"
|
||||
},
|
||||
"./src/index.js"
|
||||
],
|
||||
"./esm": "./esm/discord.mjs"
|
||||
"require": "./src/index.js",
|
||||
"import": "./src/index.mjs"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "npm run lint && npm run docs:test && npm run lint:typings",
|
||||
@@ -23,7 +18,7 @@
|
||||
"lint:fix": "eslint src --fix",
|
||||
"lint:typings": "tslint typings/index.d.ts",
|
||||
"prettier": "prettier --write src/**/*.js typings/**/*.ts",
|
||||
"prepublishOnly": "npm run test",
|
||||
"prepublishOnly": "npm run test && gen-esm-wrapper ./src/index.js ./src/index.mjs",
|
||||
"prepare": "is-ci || husky install",
|
||||
"changelog": "conventional-changelog -p angular -i RELEASE_CHANGELOG.md -s"
|
||||
},
|
||||
@@ -70,6 +65,7 @@
|
||||
"eslint-config-prettier": "^8.3.0",
|
||||
"eslint-plugin-import": "^2.23.4",
|
||||
"eslint-plugin-prettier": "^3.4.0",
|
||||
"gen-esm-wrapper": "^1.1.1",
|
||||
"husky": "^6.0.0",
|
||||
"is-ci": "^3.0.0",
|
||||
"jest": "^27.0.3",
|
||||
|
||||
Reference in New Issue
Block a user