ember-cli-deploy-compress
Advanced tools
Comparing version 0.3.1 to 0.3.2
18
index.js
@@ -21,8 +21,6 @@ /*eslint-env node*/ | ||
var fs = require('fs'); | ||
let browsers = this._getBrowsers(); | ||
let canUseBrotli = !!browsers && caniuse.isSupported('brotli', browsers); | ||
var DeployPlugin = DeployPluginBase.extend({ | ||
name: options.name, | ||
canUseBrotli: canUseBrotli, | ||
canUseBrotli: false, | ||
defaultConfig: { | ||
@@ -59,2 +57,6 @@ filePattern: '**/*.{js,css,json,ico,map,xml,txt,svg,eot,ttf,woff,woff2,appcache,webmanifest}', | ||
// Intentionally calling this as late as possible to give other addons a | ||
// chance to influence it somehow, e.g. through ENV variables. | ||
this._determineBrotliSupport(); | ||
let promises = { gzippedFiles: [], brotliCompressedFiles: [] }; | ||
@@ -143,2 +145,6 @@ if (this._mustCompressWithBrotli()) { | ||
}, | ||
_determineBrotliSupport() { | ||
let browsers = this.project && this.project.targets && this.project.targets.browsers; | ||
this.canUseBrotli = !!browsers && caniuse.isSupported('brotli', browsers); | ||
}, | ||
_mustCompressWithBrotli() { | ||
@@ -180,7 +186,3 @@ let compression = this._getCompression(); | ||
return new DeployPlugin(); | ||
}, | ||
_getBrowsers() { | ||
return this.project && this.project.targets && this.project.targets.browsers; | ||
}, | ||
} | ||
}; |
{ | ||
"name": "ember-cli-deploy-compress", | ||
"version": "0.3.1", | ||
"version": "0.3.2", | ||
"description": "Ember CLI Deploy plugin to compress files in gzip or brotli automatically depending on supported browsers", | ||
@@ -5,0 +5,0 @@ "directories": { |
246886
209