mirror of
https://github.com/danbulant/discord.js
synced 2026-07-09 13:10:42 +00:00
Update dependencies & make webpack great again
This commit is contained in:
parent
e3cd000ec0
commit
0c34f3a313
12 changed files with 103 additions and 106 deletions
15
package.json
15
package.json
|
|
@ -34,7 +34,7 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"long": "^3.2.0",
|
"long": "^3.2.0",
|
||||||
"prism-media": "^0.0.1",
|
"prism-media": "^0.0.1",
|
||||||
"snekfetch": "^3.1.0",
|
"snekfetch": "^3.2.0",
|
||||||
"tweetnacl": "^1.0.0",
|
"tweetnacl": "^1.0.0",
|
||||||
"ws": "^3.0.0"
|
"ws": "^3.0.0"
|
||||||
},
|
},
|
||||||
|
|
@ -45,16 +45,15 @@
|
||||||
"opusscript": "^0.0.3",
|
"opusscript": "^0.0.3",
|
||||||
"sodium": "^2.0.1",
|
"sodium": "^2.0.1",
|
||||||
"libsodium-wrappers": "^0.5.1",
|
"libsodium-wrappers": "^0.5.1",
|
||||||
"uws": "^0.14.1"
|
"uws": "^8.14.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/node": "^7.0.0",
|
"@types/node": "^8.0.0",
|
||||||
"discord.js-docgen": "hydrabolt/discord.js-docgen",
|
"discord.js-docgen": "hydrabolt/discord.js-docgen",
|
||||||
"eslint": "^3.19.0",
|
"eslint": "^4.0.0",
|
||||||
"parallel-webpack": "^1.6.0",
|
"parallel-webpack": "^2.0.0",
|
||||||
"uglify-js": "mishoo/UglifyJS2#harmony-v2.8.22",
|
"uglifyjs-webpack-plugin": "iCrawl/uglifyjs-webpack-plugin",
|
||||||
"uglifyjs-webpack-plugin": "^0.4.3",
|
"webpack": "^3.0.0"
|
||||||
"webpack": "^2.2.0"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.0.0"
|
"node": ">=8.0.0"
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ const Collector = require('./interfaces/Collector');
|
||||||
* @extends {Collector}
|
* @extends {Collector}
|
||||||
*/
|
*/
|
||||||
class MessageCollector extends Collector {
|
class MessageCollector extends Collector {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {TextChannel|DMChannel|GroupDMChannel} channel The channel
|
* @param {TextChannel|DMChannel|GroupDMChannel} channel The channel
|
||||||
* @param {CollectorFilter} filter The filter to be applied to this collector
|
* @param {CollectorFilter} filter The filter to be applied to this collector
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ const Collection = require('../util/Collection');
|
||||||
* @extends {Collector}
|
* @extends {Collector}
|
||||||
*/
|
*/
|
||||||
class ReactionCollector extends Collector {
|
class ReactionCollector extends Collector {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {Message} message The message upon which to collect reactions
|
* @param {Message} message The message upon which to collect reactions
|
||||||
* @param {CollectorFilter} filter The filter to apply to this collector
|
* @param {CollectorFilter} filter The filter to apply to this collector
|
||||||
|
|
|
||||||
|
|
@ -213,9 +213,8 @@ class User {
|
||||||
*/
|
*/
|
||||||
deleteDM() {
|
deleteDM() {
|
||||||
if (!this.dmChannel) return Promise.reject(new Error('No DM Channel exists!'));
|
if (!this.dmChannel) return Promise.reject(new Error('No DM Channel exists!'));
|
||||||
return this.client.api.channels[this.dmChannel.id].delete().then(data =>
|
return this.client.api.channels[this.dmChannel.id].delete()
|
||||||
this.client.actions.ChannelDelete.handle(data).channel
|
.then(data => this.client.actions.ChannelDelete.handle(data).channel);
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -11,9 +11,10 @@ const version = require('./package.json').version;
|
||||||
const createConfig = options => {
|
const createConfig = options => {
|
||||||
const plugins = [
|
const plugins = [
|
||||||
new webpack.DefinePlugin({ 'global.GENTLY': false }),
|
new webpack.DefinePlugin({ 'global.GENTLY': false }),
|
||||||
|
new webpack.optimize.ModuleConcatenationPlugin(),
|
||||||
];
|
];
|
||||||
|
|
||||||
if (options.minify) plugins.push(new UglifyJSPlugin({ minimize: true }));
|
if (options.minify) plugins.push(new UglifyJSPlugin({ uglifyOptions: { output: { comments: false } } }));
|
||||||
|
|
||||||
const filename = `./webpack/discord${process.env.VERSIONED === 'false' ? '' : '.' + version}${options.minify ? '.min' : ''}.js`; // eslint-disable-line
|
const filename = `./webpack/discord${process.env.VERSIONED === 'false' ? '' : '.' + version}${options.minify ? '.min' : ''}.js`; // eslint-disable-line
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue