mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
Particular problems and how they were resolved:
- The `fs-extra` module, used exclusively by TokenCacher, didn't have a browser version. I rewrote TokenCacher to not use fs-extra (see fdd4cfc7cc)
- TokenCacher wouldn't work in the browser anyway due to lack of a file system. I made a shim (`Util/TokenCacher-shim.js`) that implements all TokenCacher functionality as null implementations, this causes `login` to always make a request.
- Compressed packets couldn't be parsed because neither node's Buffers nor zlib were working correctly. Initially I tried to make a browser-only parser class that parses compressed `Blob` packets, but this didn't work out, so I just disabled compression by default.
53 lines
1.2 KiB
JSON
53 lines
1.2 KiB
JSON
{
|
|
"name": "discord.js",
|
|
"version": "5.3.2",
|
|
"description": "A way to interface with the Discord API",
|
|
"main": "./entrypoint.js",
|
|
"scripts": {
|
|
"test": "eslint *.js lib test && node test/lib-test.js"
|
|
},
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/hydrabolt/discord.js.git"
|
|
},
|
|
"keywords": [
|
|
"discord",
|
|
"api",
|
|
"bot",
|
|
"client",
|
|
"node",
|
|
"discordapp"
|
|
],
|
|
"author": "Amish Shah <amishshah.2k@gmail.com>",
|
|
"license": "Apache-2.0",
|
|
"bugs": {
|
|
"url": "https://github.com/hydrabolt/discord.js/issues"
|
|
},
|
|
"homepage": "https://github.com/hydrabolt/discord.js#readme",
|
|
"dependencies": {
|
|
"superagent": "^1.5.0",
|
|
"unpipe": "^1.0.0",
|
|
"ws": "^0.8.1"
|
|
},
|
|
"devDependencies": {
|
|
"colors": "^1.1.2",
|
|
"eslint": "^1.10.3",
|
|
"grunt": "^0.4.5",
|
|
"grunt-babel": "<6.0.0",
|
|
"grunt-browserify": "^4.0.1",
|
|
"grunt-contrib-uglify": "^0.11.0",
|
|
"load-grunt-tasks": "^3.3.0",
|
|
"mocha": "^2.3.4"
|
|
},
|
|
"optionalDependencies": {
|
|
"node-opus": "^0.1.11"
|
|
},
|
|
"engines": {
|
|
"node": ">=0.12.7"
|
|
},
|
|
"browser": {
|
|
"./src/Util/TokenCacher.js": "./src/Util/TokenCacher-shim.js",
|
|
"./lib/Util/TokenCacher.js": "./lib/Util/TokenCacher-shim.js"
|
|
}
|
|
}
|