Skip to content

Commit

Permalink
Merge branch 'release/1.4.43' into v1
Browse files Browse the repository at this point in the history
  • Loading branch information
khalwat committed Nov 6, 2018
2 parents e181698 + 8fb4400 commit 5eb6218
Show file tree
Hide file tree
Showing 56 changed files with 2,393 additions and 1,029 deletions.
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# CRAFT ENVIRONMENT
.env.php
.env.sh
.env

# COMPOSER
/vendor

# BUILD FILES
/bower_components/*
/node_modules/*
/build/*
/yarn-error.log

# MISC FILES
.cache
Expand All @@ -17,3 +23,12 @@
*.sublime-project
*.tmproj
*.tmproject
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
config.codekit3
prepros-6.config

# BUILD FILES
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# ImageOptimize Changelog

## 1.4.43 - 2018.11.05
### Changed
* Fix Thumbor focal point order
* Fix a regression that broke images in sub-folders for Imgix
* Retooled the JavaScript build system to be more compatible with edge case server setups

## 1.4.42 - 2018.10.15
### Added
* Added the ability to have OptimizedImages fields ignore `SVG` and/or `GIF` files
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,13 @@ If you're using the [LazySizes](https://github.com/aFarkas/lazysizes) JavaScript
sizes="100vw" />
```

If you want to check to see if `.webp` is supported on the server so you can conditionally include `.webp` images, you can do:

```twig
{% if craft.imageOptimize.serverSupportsWebP() %}
{% endif %}
```

#### Picture Elements

To use `<picture>` in your templates, you can just do:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "nystudio107/craft-imageoptimize",
"description": "Automatically create & optimize responsive image transforms, using either native Craft transforms or a service like Imgix, with zero template changes.",
"type": "craft-plugin",
"version": "1.4.42",
"version": "1.4.43",
"keywords": [
"craft",
"cms",
Expand Down
103 changes: 32 additions & 71 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,77 +24,29 @@
"dev": "webpack-dev-server --config webpack.dev.js",
"build": "webpack --config webpack.prod.js --progress --hide-modules"
},
"project": {
"name": "Image Optimize",
"copyright": "nystudio107",
"paths": {
"src": {
"base": "./src/assetbundles/imageoptimize/src/",
"css": "./src/assetbundles/imageoptimize/src/css/",
"js": "./src/assetbundles/imageoptimize/src/js/"
},
"dist": {
"base": "./src/assetbundles/imageoptimize/dist/",
"clean": [
"./js",
"./css"
]
},
"templates": "./src/templates/"
},
"urls": {
"publicPath": "/cpresources/imageoptimize/"
},
"vars": {
"cssName": "styles"
},
"entries": {
"imageoptimize": "ImageOptimize.js",
"welcome": "Welcome.js"
},
"babelConfig": {
"legacyBrowsers": [
"> 1%",
"last 2 versions",
"Firefox ESR"
],
"modernBrowsers": [
"last 2 Chrome versions",
"not Chrome < 60",
"last 2 Safari versions",
"not Safari < 10.1",
"last 2 iOS versions",
"not iOS < 10.3",
"last 2 Firefox versions",
"not Firefox < 54",
"last 2 Edge versions",
"not Edge < 15"
]
},
"copyWebpackConfig": [],
"devServerConfig": {
"public": "http://192.168.10.10:8080",
"host": "0.0.0.0",
"poll": true
},
"manifestConfig": {
"basePath": ""
},
"purgeCssConfig": {
"paths": [
"./src/templates/**/*.{twig,html}"
],
"whitelist": [
"../css/components.pcss"
],
"whitelistPatterns": [],
"extensions": [
"html",
"js",
"twig",
"vue"
]
}
"browserslist": {
"production": [
"> 1%",
"last 2 versions",
"Firefox ESR"
],
"legacyBrowsers": [
"> 1%",
"last 2 versions",
"Firefox ESR"
],
"modernBrowsers": [
"last 2 Chrome versions",
"not Chrome < 60",
"last 2 Safari versions",
"not Safari < 10.1",
"last 2 iOS versions",
"not iOS < 10.3",
"last 2 Firefox versions",
"not Firefox < 54",
"last 2 Edge versions",
"not Edge < 15"
]
},
"devDependencies": {
"@babel/core": "^7.1.0",
Expand All @@ -109,10 +61,19 @@
"copy-webpack-plugin": "^4.5.2",
"css-loader": "^1.0.0",
"cssnano": "^4.1.0",
"dotenv": "^6.1.0",
"file-loader": "^2.0.0",
"git-rev-sync": "^1.12.0",
"glob-all": "^3.1.0",
"ignore-loader": "^0.1.2",
"imagemin": "^6.0.0",
"imagemin-gifsicle": "^5.2.0",
"imagemin-mozjpeg": "^7.0.0",
"imagemin-optipng": "^5.2.1",
"imagemin-svgo": "^7.0.0",
"imagemin-webp": "^4.1.0",
"imagemin-webp-webpack-plugin": "^1.0.2",
"img-loader": "^3.0.1",
"mini-css-extract-plugin": "^0.4.3",
"moment": "^2.22.2",
"optimize-css-assets-webpack-plugin": "^5.0.1",
Expand Down
2 changes: 0 additions & 2 deletions src/ImageOptimize.php
Original file line number Diff line number Diff line change
Expand Up @@ -505,8 +505,6 @@ function (RegisterUrlRulesEvent $event) {
protected function customFrontendRoutes(): array
{
return [
// Make webpack async bundle loading work out of published AssetBundles
'/cpresources/imageoptimize/<resourceType:{handle}>/<fileName>' => 'image-optimize/manifest/resource',
];
}

Expand Down

This file was deleted.

This file was deleted.

10 changes: 10 additions & 0 deletions src/assetbundles/imageoptimize/dist/css/styles.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/assetbundles/imageoptimize/dist/css/styles.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 1 addition & 29 deletions src/assetbundles/imageoptimize/dist/img/ImageOptimize-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5eb6218

Please sign in to comment.