Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
karma-gzip-preprocessor
Advanced tools
A Karma preprocessor for compressing test assets.
Particularly handy when working with large test bundles and remote browser-cloud services like Browserstack or Saucelabs.
npm install karma-gzip-preprocessor --save-dev
Since karma-gzip-preprocessor has a minimum requirement of karma v3.1.0.
For older versions of karma, see the README for karma-gzip v2.
To enable gzip compression, all you need to do is add gzip
as a preprocessor in your karma config.
// karma.conf.js
module.exports = function(config) {
config.set({
files: [
'src/**/*.test.js'
],
// The plugins config property is optional, but if it is included it must include 'karma-gzip-preprocessor'
plugins: [
'karma-gzip-preprocessor',
],
preprocessors: {
'src/**/*.js': ['gzip'],
// The `gzip` preprocessor should always be the last preprocessor
'*.coffee': ['coffee', 'gzip'],
},
});
};
Verify your assets are gzipped when you see output simmilar to the following:
$ karma start
INFO [preprocessor.gzip]: compressed /MyProject/src/polyfills.js [2MB -> 437KB]
INFO [preprocessor.gzip]: compressed /MyProject/src/index.test.js [5MB -> 1MB]
[3.0.0] - 2018-12-06
FAQs
A gzip preprocessor for Karma
The npm package karma-gzip-preprocessor receives a total of 11 weekly downloads. As such, karma-gzip-preprocessor popularity was classified as not popular.
We found that karma-gzip-preprocessor demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.