Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

responsive-loader

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

responsive-loader - npm Package Compare versions

Comparing version 1.0.0-rc.2 to 1.0.0

1

CHANGELOG.md

@@ -51,2 +51,3 @@ # Change Log

- Changed default JPEG `quality` to `85`
- The `pass` option is now called `disable`

@@ -53,0 +54,0 @@ ## v0.7.0

9

lib/index.js

@@ -61,8 +61,11 @@ 'use strict';

if (config.pass) {
if (config.disable) {
// emit original content only
var f = loaderUtils.interpolateName(loaderContext, name, { context: outputContext, content: content });
var f = loaderUtils.interpolateName(loaderContext, name, {
context: outputContext,
content: content
}).replace(/\[width\]/ig, '100').replace(/\[height\]/ig, '100');
loaderContext.emitFile(f, content);
var p = '__webpack_public_path__ + ' + JSON.stringify(f);
return loaderCallback(null, 'module.exports = {srcSet:' + p + ',images:[{path:' + p + ',width:1}],src: ' + p + ',toString:function(){return ' + p + '}};');
return loaderCallback(null, 'module.exports = {srcSet:' + p + ',images:[{path:' + p + ',width:100,height:100}],src: ' + p + ',toString:function(){return ' + p + '}};');
}

@@ -69,0 +72,0 @@

{
"name": "responsive-loader",
"version": "1.0.0-rc.2",
"version": "1.0.0",
"description": "A webpack loader for responsive images",

@@ -53,8 +53,5 @@ "main": "lib/index.js",

"jimp": "^0.2.21",
"sharp": "^0.18.1",
"webpack": "^3.0.0"
"sharp": "^0.18.2",
"webpack": "^3.1.0"
},
"peerDependencies": {
"jimp": "^0.2.21"
},
"jest": {

@@ -61,0 +58,0 @@ "testEnvironment": "node"

@@ -9,2 +9,4 @@ # responsive-loader

> Note: starting with v1.0.0, responsive-loader is only compatible with webpack 2+. For webpack 1 support, use responsive-loader@0.7.0
### With jimp

@@ -117,5 +119,6 @@

- `format: string` — either `png` or `jpg`; use to convert to another format; default format is inferred from the source file's extension
- `placeholder: bool` — A true or false value to specify wether to output a placeholder image as a data URI; defaults to `false`
- `placeholder: boolean` — A true or false value to specify wether to output a placeholder image as a data URI; defaults to `false`
- `placeholderSize: integer` — A number value specifying the width of the placeholder image, if enabled with the option above; defaults to `40`
- `adapter: Adapter` — Specify which adapter to use. Can only be specified in the loader options.
- `disable: boolean` — Disable processing of images by this loader (useful in development). `srcSet` and other attributes will still be generated but only for the original size. Note that the `width` and `height` attributes will both be set to `100` but the image will retain its original dimensions.

@@ -122,0 +125,0 @@ #### Adapter-specific options

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc