- 修复Dockerfile构建问题,暂时禁用ideal-image插件 - 更新所有配置文件中的registry端口为5003 - 添加.dockerignore文件优化构建性能 - 创建docker-compose.yml文件支持本地部署 - 添加部署脚本scripts/deploy-docker.sh - 更新Gitea Actions工作流,添加Docker部署步骤 - 创建DOCKER_DEPLOYMENT.md部署文档 - 支持通过3001端口提供lingjingwanxiang web portal服务
3.9 KiB
Changelog
v1.4.0
- Update dependencies
- Remove flow
- Remove Travis CI config
- Ensure webpack 5 support
v1.1.0
- Added
minandmaxoptions to automatically generate a number of images, andstepsoption to say how many images (#31).
v1.0.0
New
Breaking
Webpack 2 support
Removed support for webpack 1! Please upgrade to webpack >= 2.
The syntax to import images has changed. The query part now comes after the resource (the image) instead of the loader.
- require('responsive-loader?size=100!some-image.jpg')
+ require('responsive-loader!some-image.jpg?size=100')
That means if responsive-loader is configured in your webpack-config, it's possible to specify image-specific options without having to add the loader part to the import path. For example:
// webpack.config.js
module.exports = {
// ...
module: {
rules: [
{
test: /\.jpg$/,
loader: 'responsive-loader',
options: {
size: 1000
//...
}
}
]
},
}
// some-file.js
const image1000 = require('some-image.jpg') // will have size 1000 from the config
const image500 = require('some-image.jpg?size=500')
Other breaking changes
- The
extoption was removed, in favor offormat=jpg|png.[ext]is now part of thenameoption like in other loaders (fixes #13) - Changed default JPEG
qualityto85 - The
passoption is now calleddisable
v0.7.0
v0.6.1
- Declare default
name,context,quality, andbackgroundthrough webpack options when they're not specified in the loader query (#12).
v0.6.0
- Add linting (#7)
- Breaking (maybe): Require node >= v4
v0.5.3
- Fix wrong callback being called on file load error (#6)
v0.5.2
- Added tests!
- Update
queue-asynctod3-queue
v0.5.1
- Optimization: skip resizing images of the same size (#5)
v0.5.0
Using the size option for getting only one resized image no longer just returns a string but the same object structure as when using sizes. The difference is, that when toString() is called on that object, it will return the path of the first resized image.
Also, for pure convenience, the returned object also contains a src property, so it can be spread onto a React component (e.g. <img {...resized} />).
Before
This worked:
import resized from 'responsive?sizes[]=100,sizes[]=200';
<img srcSet={resized.srcSet} src={resized.images[0].path} />
.foo { background-image: url('responsive?size=100'); }
But this didn't :sob::
import resized from 'responsive?size=100';
// Whoops, error because `resized` ist just a string
<img srcSet={resized.srcSet} src={resized.images[0].path} />
/* Whoops, `url('[object Object]')` */
.foo { background-image: url('responsive?sizes[]=100'); }
After
All these work ✌️
import resized from 'responsive?sizes[]=100,sizes[]=200';
<img srcSet={resized.srcSet} src={resized.src} />
<img srcSet={resized.srcSet} src={resized} />
<img {...resized} />
.foo { background-image: url('responsive?sizes[]=100,sizes[]=200'); }
.foo { background-image: url('responsive?sizes[]=100'); }
.foo { background-image: url('responsive?size=100'); }