Update dependencies & make webpack great again

This commit is contained in:
Crawl
2017-07-05 11:53:53 +02:00
parent e3cd000ec0
commit 0c34f3a313
12 changed files with 103 additions and 106 deletions

View File

@@ -34,7 +34,7 @@
"dependencies": {
"long": "^3.2.0",
"prism-media": "^0.0.1",
"snekfetch": "^3.1.0",
"snekfetch": "^3.2.0",
"tweetnacl": "^1.0.0",
"ws": "^3.0.0"
},
@@ -45,16 +45,15 @@
"opusscript": "^0.0.3",
"sodium": "^2.0.1",
"libsodium-wrappers": "^0.5.1",
"uws": "^0.14.1"
"uws": "^8.14.0"
},
"devDependencies": {
"@types/node": "^7.0.0",
"@types/node": "^8.0.0",
"discord.js-docgen": "hydrabolt/discord.js-docgen",
"eslint": "^3.19.0",
"parallel-webpack": "^1.6.0",
"uglify-js": "mishoo/UglifyJS2#harmony-v2.8.22",
"uglifyjs-webpack-plugin": "^0.4.3",
"webpack": "^2.2.0"
"eslint": "^4.0.0",
"parallel-webpack": "^2.0.0",
"uglifyjs-webpack-plugin": "iCrawl/uglifyjs-webpack-plugin",
"webpack": "^3.0.0"
},
"engines": {
"node": ">=8.0.0"

View File

@@ -11,7 +11,6 @@ const Collector = require('./interfaces/Collector');
* @extends {Collector}
*/
class MessageCollector extends Collector {
/**
* @param {TextChannel|DMChannel|GroupDMChannel} channel The channel
* @param {CollectorFilter} filter The filter to be applied to this collector

View File

@@ -13,7 +13,6 @@ const Collection = require('../util/Collection');
* @extends {Collector}
*/
class ReactionCollector extends Collector {
/**
* @param {Message} message The message upon which to collect reactions
* @param {CollectorFilter} filter The filter to apply to this collector

View File

@@ -213,9 +213,8 @@ class User {
*/
deleteDM() {
if (!this.dmChannel) return Promise.reject(new Error('No DM Channel exists!'));
return this.client.api.channels[this.dmChannel.id].delete().then(data =>
this.client.actions.ChannelDelete.handle(data).channel
);
return this.client.api.channels[this.dmChannel.id].delete()
.then(data => this.client.actions.ChannelDelete.handle(data).channel);
}
/**

View File

@@ -11,9 +11,10 @@ const version = require('./package.json').version;
const createConfig = options => {
const plugins = [
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