From 8d21378354989b1f6eccae3102d106c1af828763 Mon Sep 17 00:00:00 2001 From: Tim Kelty Date: Mon, 8 Oct 2018 20:26:34 -0400 Subject: [PATCH 01/15] Fix paths for subdirector --- src/imagetransforms/ImageTransform.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/imagetransforms/ImageTransform.php b/src/imagetransforms/ImageTransform.php index fc49206f..27b6b742 100644 --- a/src/imagetransforms/ImageTransform.php +++ b/src/imagetransforms/ImageTransform.php @@ -94,10 +94,15 @@ public static function getTransformParams(): array public static function getAssetUri(Asset $asset) { $volume = $asset->getVolume(); - $assetUrl = AssetsHelper::generateUrl($volume, $asset); - $assetUri = parse_url($assetUrl, PHP_URL_PATH); + $assetPath = $file->getPath(); - return $assetUri; + // Account for volume types with a subfolder setting + // e.g. craftcms/aws-s3, craftcms/google-cloud + if ($volume->subfolder ?? null) { + return rtrim($volume->subfolder, '/').'/'.$assetPath; + } + + return $assetPath; } /** From 1535c5efd740bda266f6a8ba4402851ea519016c Mon Sep 17 00:00:00 2001 From: Tim Kelty Date: Mon, 8 Oct 2018 20:37:20 -0400 Subject: [PATCH 02/15] Fix --- src/imagetransforms/ImageTransform.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/imagetransforms/ImageTransform.php b/src/imagetransforms/ImageTransform.php index 27b6b742..c5ae077d 100644 --- a/src/imagetransforms/ImageTransform.php +++ b/src/imagetransforms/ImageTransform.php @@ -94,7 +94,7 @@ public static function getTransformParams(): array public static function getAssetUri(Asset $asset) { $volume = $asset->getVolume(); - $assetPath = $file->getPath(); + $assetPath = $asset->getPath(); // Account for volume types with a subfolder setting // e.g. craftcms/aws-s3, craftcms/google-cloud From 583c380fbcd4bd2f53441ea1ed0f77259865ee49 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Tue, 9 Oct 2018 08:33:27 -0400 Subject: [PATCH 03/15] Updated build config Signed-off-by: Andrew Welch --- package.json | 149 ++++++++++++++++++++++-------------------- webpack.common.js | 50 +++++++------- webpack.dev.js | 10 +-- webpack.prod.js | 161 +++++++++++++++++++++++----------------------- 4 files changed, 190 insertions(+), 180 deletions(-) diff --git a/package.json b/package.json index 103ff1a1..58c70bc2 100644 --- a/package.json +++ b/package.json @@ -1,87 +1,96 @@ { - "name": "imageoptimize", + "name": "image-optimize", "version": "1.0.0", - "description": "Automatically optimize images after they've been transformed", - "copyright": "nystudio107", - "main": "index.js", - "scripts": { - "dev": "webpack-dev-server --config webpack.dev.js --progress --hide-modules", - "build": "webpack --config webpack.prod.js" + "description": "Automatically create & optimize responsive image transforms, using either native Craft transforms or a service like Imgix, with zero template changes.", + "keywords": [], + "homepage": "https://github.com/nystudio107/craft-imageoptimize", + "bugs": { + "email": "info@nystudio107.com", + "url": "https://github.com/nystudio107/craft-imageoptimize/issues" }, + "license": "SEE LICENSE IN LICENSE.md", + "author": { + "name": "Andrew Welch", + "email": "andrew@nystudio107.com", + "url": "https://nystudio107.com/" + }, + "browser": "./src/ImageOptimize.php", "repository": { "type": "git", "url": "git+https://github.com/nystudio107/craft-imageoptimize.git" }, - "author": "andrew@nystudio107.com", - "license": "proprietary", - "bugs": { - "url": "https://github.com/nystudio107/craft-imageoptimize/issues" + "private": true, + "scripts": { + "dev": "webpack-dev-server --config webpack.dev.js --progress --hide-modules", + "build": "webpack --config webpack.prod.js" }, - "homepage": "https://github.com/nystudio107/craft-imageoptimize", - "paths": { - "src": { - "base": "./src/assetbundles/imageoptimize/src/", - "js": "./src/assetbundles/imageoptimize/src/js/", - "css": "./src/assetbundles/imageoptimize/src/css/" + "project": { + "paths": { + "name": "Image Optimize", + "copyright": "nystudio107", + "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/" }, - "dist": { - "base": "./src/assetbundles/imageoptimize/dist/", + "urls": { "public": "/cpresources/imageoptimize/", - "devPublic": "http://192.168.10.10:8080", - "clean": [ - "./js", - "./css" + "devPublic": "http://192.168.10.10:8080" + }, + "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" ] }, - "copyFiles": [ - ], - "manifest": { + "copyWebpackConfig": [], + "manifestConfig": { "basePath": "" }, - "templates": "./src/templates/" - }, - "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" - ] - }, - "purgeCss": { - "paths": [ - "./src/templates/**/*.{twig,html}" - ], - "whitelist": [ - "../css/components.pcss" - ], - "whitelistPatterns": [], - "extensions": [ - "html", - "js", - "twig", - "vue" - ] - }, - "urls": {}, - "vars": { - "cssName": "styles", - "jsName": "imageoptimize" + "purgeCssConfig": { + "paths": [ + "./src/templates/**/*.{twig,html}" + ], + "whitelist": [ + "../css/components.pcss" + ], + "whitelistPatterns": [], + "extensions": [ + "html", + "js", + "twig", + "vue" + ] + } }, "devDependencies": { "@babel/core": "^7.1.0", diff --git a/webpack.common.js b/webpack.common.js index 1dff0af5..767761dd 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -15,15 +15,8 @@ const WebpackNotifierPlugin = require('webpack-notifier'); // config files const pkg = require('./package.json'); -// Vue loader -const configureVueLoader = () => { - return { - test: /\.vue$/, - loader: 'vue-loader' - }; -}; -// Babel loader +// Configure Babel loader const configureBabelLoader = (browserList) => { return { test: /\.js$/, @@ -55,7 +48,17 @@ const configureBabelLoader = (browserList) => { }; }; -// Image loader +// Configure Entries from package.json +const configureEntries = () => { + let entries = {}; + for (const [key, value] of Object.entries(pkg.project.entries)) { + entries[key] = path.resolve(__dirname, pkg.project.paths.src.js + value); + } + + return entries; +}; + +// Configure Image loader const configureImageLoader = () => { return { test: /\.png|jpe?g|gif|svg$/, @@ -66,11 +69,11 @@ const configureImageLoader = () => { }; }; -// Manifest +// Configure Manifest const configureManifest = (fileName) => { return { fileName: fileName, - basePath: pkg.paths.manifest.basePath, + basePath: pkg.project.manifestConfig.basePath, map: (file) => { file.name = file.name.replace(/(\.[a-f0-9]{32})(\..*)$/, '$2'); return file; @@ -78,14 +81,12 @@ const configureManifest = (fileName) => { }; }; -// Entries from package.json -const configureEntries = () => { - let entries = {}; - for (const [key, value] of Object.entries(pkg.entries)) { - entries[key] = path.resolve(__dirname, pkg.paths.src.js + value); - } - - return entries; +// Configure Vue loader +const configureVueLoader = () => { + return { + test: /\.vue$/, + loader: 'vue-loader' + }; }; // The base webpack config @@ -93,8 +94,8 @@ const baseConfig = { name: pkg.name, entry: configureEntries(), output: { - path: path.resolve(__dirname, pkg.paths.dist.base), - publicPath: pkg.paths.dist.public + path: path.resolve(__dirname, pkg.project.paths.dist.base), + publicPath: pkg.project.urls.public }, resolve: { alias: { @@ -116,13 +117,13 @@ const baseConfig = { const legacyConfig = { module: { rules: [ - configureBabelLoader(Object.values(pkg.babelConfig.legacyBrowsers)), + configureBabelLoader(Object.values(pkg.project.babelConfig.legacyBrowsers)), configureImageLoader(), ], }, plugins: [ new CopyWebpackPlugin( - pkg.paths.copyFiles + pkg.project.copyWebpackConfig ), new ManifestPlugin( configureManifest('manifest-legacy.json') @@ -134,7 +135,7 @@ const legacyConfig = { const modernConfig = { module: { rules: [ - configureBabelLoader(Object.values(pkg.babelConfig.modernBrowsers)), + configureBabelLoader(Object.values(pkg.project.babelConfig.modernBrowsers)), ], }, plugins: [ @@ -145,6 +146,7 @@ const modernConfig = { }; // Common module exports +// noinspection WebpackConfigHighlighting module.exports = { 'legacyConfig': merge( legacyConfig, diff --git a/webpack.dev.js b/webpack.dev.js index 50f2e910..5b6a05f2 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -3,11 +3,11 @@ const LEGACY_CONFIG = 'legacy'; const MODERN_CONFIG = 'modern'; // node modules +const merge = require('webpack-merge'); const path = require('path'); +const webpack = require('webpack'); // webpack plugins -const merge = require('webpack-merge'); -const webpack = require('webpack'); // config files const pkg = require('./package.json'); @@ -18,7 +18,7 @@ const configureDevServer = (buildType) => { return { contentBase: './web', host: '0.0.0.0', - public: pkg.paths.dist.devPublic, + public: pkg.project.urls.devPublic, https: false, hot: true, hotOnly: true, @@ -77,7 +77,7 @@ module.exports = [ { output: { filename: path.join('./js', '[name]-legacy.[hash].js'), - publicPath: pkg.paths.dist.devPublic + '/', + publicPath: pkg.project.urls.devPublic + '/', }, mode: 'development', devtool: 'inline-source-map', @@ -97,7 +97,7 @@ module.exports = [ { output: { filename: path.join('./js', '[name].[hash].js'), - publicPath: pkg.paths.dist.devPublic + '/', + publicPath: pkg.project.urls.devPublic + '/', }, mode: 'development', devtool: 'inline-source-map', diff --git a/webpack.prod.js b/webpack.prod.js index ba0727f5..587e6da4 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -3,20 +3,20 @@ const LEGACY_CONFIG = 'legacy'; const MODERN_CONFIG = 'modern'; // node modules -const webpack = require('webpack'); -const glob = require("glob-all"); -const path = require('path'); const git = require('git-rev-sync'); +const glob = require('glob-all'); +const merge = require('webpack-merge'); const moment = require('moment'); +const path = require('path'); +const webpack = require('webpack'); // webpack plugins -const merge = require('webpack-merge'); const CleanWebpackPlugin = require('clean-webpack-plugin'); -const MiniCssExtractPlugin = require("mini-css-extract-plugin"); +const MiniCssExtractPlugin = require('mini-css-extract-plugin'); +const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); +const PurgecssPlugin = require('purgecss-webpack-plugin'); const TerserPlugin = require('terser-webpack-plugin'); -const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin"); -const PurgecssPlugin = require("purgecss-webpack-plugin"); -const whitelister = require('purgecss-whitelister'); +const WhitelisterPlugin = require('purgecss-whitelister'); // config files const pkg = require('./package.json'); @@ -32,17 +32,17 @@ class TailwindExtractor { } } -// File banner banner +// Configure file banner const configureBanner = () => { return { banner: [ '/*!', - ' * @project ' + pkg.copyright, + ' * @project ' + pkg.project.name, ' * @name ' + '[filebase]', - ' * @author ' + pkg.author, + ' * @author ' + pkg.author.name, ' * @build ' + moment().format('llll') + ' ET', ' * @release ' + git.long() + ' [' + git.branch() + ']', - ' * @copyright Copyright (c) ' + moment().format('YYYY') + ' ' + pkg.copyright, + ' * @copyright Copyright (c) ' + moment().format('YYYY') + ' ' + pkg.project.copyright, ' *', ' */', '' @@ -51,79 +51,15 @@ const configureBanner = () => { }; }; -// Configure PurgeCSS -const configurePurgeCss = () => { - let paths = []; - // Configure whitelist paths - for (const [key, value] of Object.entries(pkg.purgeCss.paths)) { - paths.push(path.join(__dirname, value)); - } - - return { - paths: glob.sync(paths), - whitelist: whitelister(pkg.purgeCss.whitelist), - whitelistPatterns: pkg.purgeCss.whitelistPatterns, - extractors: [{ - extractor: TailwindExtractor, - extensions: pkg.purgeCss.extensions - }] - }; -}; - -// Configure clean webpack +// Configure Clean webpack const configureCleanWebpack = () => { return { - root: path.resolve(__dirname, pkg.paths.dist.base), + root: path.resolve(__dirname, pkg.project.paths.dist.base), verbose: true, dry: false }; }; -// Configure terser -const configureTerser = () => { - return { - cache: true, - parallel: true, - sourceMap: true - }; -}; - - -// Postcss loader -const configurePostcssLoader = (buildType) => { - if (buildType === LEGACY_CONFIG) { - return { - test: /\.(pcss|css)$/, - use: [ - MiniCssExtractPlugin.loader, - { - loader: 'css-loader', - options: { - importLoaders: 2, - sourceMap: true - } - }, - { - loader: 'resolve-url-loader' - }, - { - loader: 'postcss-loader', - options: { - sourceMap: true - } - } - ] - }; - } - // Don't generate CSS for the modern config in production - if (buildType === MODERN_CONFIG) { - return { - test: /\.(pcss|css)$/, - loader: 'ignore-loader' - }; - } -}; - // Configure optimization const configureOptimization = (buildType) => { if (buildType === LEGACY_CONFIG) { @@ -133,7 +69,7 @@ const configureOptimization = (buildType) => { default: false, common: false, styles: { - name: pkg.vars.cssName, + name: pkg.project.vars.cssName, test: /\.(pcss|css|vue)$/, chunks: 'all', enforce: true @@ -168,6 +104,69 @@ const configureOptimization = (buildType) => { } }; +// Configure Postcss loader +const configurePostcssLoader = (buildType) => { + if (buildType === LEGACY_CONFIG) { + return { + test: /\.(pcss|css)$/, + use: [ + MiniCssExtractPlugin.loader, + { + loader: 'css-loader', + options: { + importLoaders: 2, + sourceMap: true + } + }, + { + loader: 'resolve-url-loader' + }, + { + loader: 'postcss-loader', + options: { + sourceMap: true + } + } + ] + }; + } + // Don't generate CSS for the modern config in production + if (buildType === MODERN_CONFIG) { + return { + test: /\.(pcss|css)$/, + loader: 'ignore-loader' + }; + } +}; + +// Configure PurgeCSS +const configurePurgeCss = () => { + let paths = []; + // Configure whitelist paths + for (const [key, value] of Object.entries(pkg.project.purgeCssConfig.paths)) { + paths.push(path.join(__dirname, value)); + } + + return { + paths: glob.sync(paths), + whitelist: WhitelisterPlugin(pkg.project.purgeCssConfig.whitelist), + whitelistPatterns: pkg.project.purgeCssConfig.whitelistPatterns, + extractors: [{ + extractor: TailwindExtractor, + extensions: pkg.project.purgeCssConfig.extensions + }] + }; +}; + +// Configure terser +const configureTerser = () => { + return { + cache: true, + parallel: true, + sourceMap: true + }; +}; + // Production module exports module.exports = [ merge( @@ -185,11 +184,11 @@ module.exports = [ ], }, plugins: [ - new CleanWebpackPlugin(pkg.paths.dist.clean, + new CleanWebpackPlugin(pkg.project.paths.dist.clean, configureCleanWebpack() ), new MiniCssExtractPlugin({ - path: path.resolve(__dirname, pkg.paths.dist.base), + path: path.resolve(__dirname, pkg.project.paths.dist.base), filename: path.join('./css', '[name].[chunkhash].css'), }), new PurgecssPlugin( From d487a51507a9fdc88e8b90443e852e89c42c5e0a Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Tue, 9 Oct 2018 08:33:40 -0400 Subject: [PATCH 04/15] Version 1.4.41 Signed-off-by: Andrew Welch --- CHANGELOG.md | 3 +++ composer.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0c0bbf4..35291770 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # ImageOptimize Changelog +## 1.4.41 - 2018.10.09 +### Changed + ## 1.4.40 - 2018.10.05 ### Added * Add Super Table conditional for field diff --git a/composer.json b/composer.json index 8fff1581..46afa7ef 100644 --- a/composer.json +++ b/composer.json @@ -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.40", + "version": "1.4.41", "keywords": [ "craft", "cms", From 3d365ed37c92d50d2d728be59e941ef9e3d2698d Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Wed, 10 Oct 2018 16:57:37 -0400 Subject: [PATCH 05/15] Version 1.4.41 Signed-off-by: Andrew Welch --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35291770..2acf8f19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## 1.4.41 - 2018.10.09 ### Changed +* Fixed an issue where volumes with sub-folders such as Amazon S3 or Google Cloud didn't generate the correct URLs ## 1.4.40 - 2018.10.05 ### Added From f7a63ad48c66c791df31f2749a57069166c2c720 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 11 Oct 2018 13:33:02 -0400 Subject: [PATCH 06/15] Updated build config Signed-off-by: Andrew Welch --- package.json | 9 ++- src/variables/ManifestVariable.php | 6 +- webpack.common.js | 2 +- webpack.dev.js | 29 +++++++--- yarn.lock | 93 +++++++++++++++++++++++++++++- 5 files changed, 125 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index 58c70bc2..e8a65c50 100644 --- a/package.json +++ b/package.json @@ -43,8 +43,7 @@ "templates": "./src/templates/" }, "urls": { - "public": "/cpresources/imageoptimize/", - "devPublic": "http://192.168.10.10:8080" + "publicPath": "/cpresources/imageoptimize/" }, "vars": { "cssName": "styles" @@ -73,6 +72,11 @@ ] }, "copyWebpackConfig": [], + "devServerConfig": { + "public": "http://192.168.10.10:8080", + "host": "0.0.0.0", + "poll": true + }, "manifestConfig": { "basePath": "" }, @@ -123,6 +127,7 @@ "purgecss-webpack-plugin": "^1.3.0", "purgecss-whitelister": "^2.2.0", "resolve-url-loader": "^3.0.0", + "sane": "^4.0.1", "style-loader": "^0.23.0", "terser-webpack-plugin": "^1.1.0", "vue-loader": "^15.4.2", diff --git a/src/variables/ManifestVariable.php b/src/variables/ManifestVariable.php index 2dc111be..a2bd1491 100644 --- a/src/variables/ManifestVariable.php +++ b/src/variables/ManifestVariable.php @@ -15,7 +15,7 @@ class ManifestVariable protected static $config = [ // If `devMode` is on, use webpack-dev-server to all for HMR (hot module reloading) - 'useDevServer' => true, + 'useDevServer' => false, // Manifest names 'manifest' => [ 'legacy' => 'manifest-legacy.json', @@ -44,6 +44,10 @@ public function __construct() ManifestHelper::invalidateCaches(); $bundle = new ImageOptimizeAsset(); self::$config['server']['manifestPath'] = Craft::getAlias($bundle->sourcePath); + $useDevServer = getenv('NYS_PLUGIN_DEVSERVER'); + if ($useDevServer !== false) { + self::$config['useDevServer'] = $useDevServer; + } } /** diff --git a/webpack.common.js b/webpack.common.js index 767761dd..4f3bbdea 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -95,7 +95,7 @@ const baseConfig = { entry: configureEntries(), output: { path: path.resolve(__dirname, pkg.project.paths.dist.base), - publicPath: pkg.project.urls.public + publicPath: pkg.project.urls.publicPath }, resolve: { alias: { diff --git a/webpack.dev.js b/webpack.dev.js index 5b6a05f2..67222921 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -5,6 +5,7 @@ const MODERN_CONFIG = 'modern'; // node modules const merge = require('webpack-merge'); const path = require('path'); +const sane = require('sane'); const webpack = require('webpack'); // webpack plugins @@ -16,24 +17,34 @@ const common = require('./webpack.common.js'); // Configure the webpack-dev-server const configureDevServer = (buildType) => { return { - contentBase: './web', - host: '0.0.0.0', - public: pkg.project.urls.devPublic, - https: false, + public: pkg.project.devServerConfig.public, + contentBase: path.resolve(__dirname, pkg.project.paths.templates), + host: pkg.project.devServerConfig.host, hot: true, hotOnly: true, overlay: true, stats: 'errors-only', watchOptions: { - poll: true + poll: pkg.project.devServerConfig.poll }, headers: { 'Access-Control-Allow-Origin': '*' - } + }, + // Use sane to monitor all of the templates files and sub-directories + before: (app, server) => { + const watcher = sane(path.join(__dirname, pkg.project.paths.templates), { + glob: ['**/*'], + poll: pkg.project.devServerConfig.poll, + }); + watcher.on('change', function (filePath, root, stat) { + console.log(' File modified:', filePath); + server.sockWrite(server.sockets, "content-changed"); + }); + }, }; }; -// Postcss loader +// Configure the Postcss loader const configurePostcssLoader = (buildType) => { // Don't generate CSS for the legacy config in development if (buildType === LEGACY_CONFIG) { @@ -77,7 +88,7 @@ module.exports = [ { output: { filename: path.join('./js', '[name]-legacy.[hash].js'), - publicPath: pkg.project.urls.devPublic + '/', + publicPath: pkg.project.devServerConfig.public + '/', }, mode: 'development', devtool: 'inline-source-map', @@ -97,7 +108,7 @@ module.exports = [ { output: { filename: path.join('./js', '[name].[hash].js'), - publicPath: pkg.project.urls.devPublic + '/', + publicPath: pkg.project.devServerConfig.public + '/', }, mode: 'development', devtool: 'inline-source-map', diff --git a/yarn.lock b/yarn.lock index 6bfbee32..97d363db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1174,6 +1174,12 @@ browserslist@^4.0.0, browserslist@^4.1.0: electron-to-chromium "^1.3.62" node-releases "^1.0.0-alpha.11" +bser@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719" + dependencies: + node-int64 "^0.4.0" + buffer-from@^1.0.0: version "1.1.1" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" @@ -1278,6 +1284,12 @@ caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000884: version "1.0.30000887" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000887.tgz#1769458c27bbdcf61b0cb6b5072bb6cd11fd9c23" +capture-exit@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f" + dependencies: + rsvp "^3.3.3" + chalk@^1.1.3: version "1.1.3" resolved "http://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" @@ -2171,6 +2183,12 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: md5.js "^1.3.4" safe-buffer "^5.1.1" +exec-sh@^0.2.0: + version "0.2.2" + resolved "https://registry.yarnpkg.com/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36" + dependencies: + merge "^1.2.0" + execa@^0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50" @@ -2183,6 +2201,18 @@ execa@^0.10.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + expand-brackets@^2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" @@ -2280,6 +2310,12 @@ faye-websocket@~0.11.0: dependencies: websocket-driver ">=0.5.1" +fb-watchman@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58" + dependencies: + bser "^2.0.0" + figgy-pudding@^3.1.0, figgy-pudding@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790" @@ -2457,6 +2493,12 @@ get-stream@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + dependencies: + pump "^3.0.0" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -3290,6 +3332,12 @@ make-dir@^1.0.0: dependencies: pify "^3.0.0" +makeerror@1.0.x: + version "1.0.11" + resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c" + dependencies: + tmpl "1.0.x" + map-age-cleaner@^0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.2.tgz#098fb15538fd3dbe461f12745b0ca8568d4e3f74" @@ -3346,6 +3394,10 @@ merge-source-map@^1.1.0: dependencies: source-map "^0.6.1" +merge@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" + methods@~1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" @@ -3431,7 +3483,7 @@ minimist@^0.1.0: version "0.1.0" resolved "http://registry.npmjs.org/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de" -minimist@^1.2.0: +minimist@^1.1.1, minimist@^1.2.0: version "1.2.0" resolved "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" @@ -3573,6 +3625,10 @@ node-forge@0.7.5: version "0.7.5" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.5.tgz#6c152c345ce11c52f465c2abd957e8639cd674df" +node-int64@^0.4.0: + version "0.4.0" + resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" + node-libs-browser@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df" @@ -4781,6 +4837,10 @@ ripemd160@^2.0.0, ripemd160@^2.0.1: hash-base "^3.0.0" inherits "^2.0.1" +rsvp@^3.3.3: + version "3.6.2" + resolved "https://registry.yarnpkg.com/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a" + run-queue@^1.0.0, run-queue@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/run-queue/-/run-queue-1.0.3.tgz#e848396f057d223f24386924618e25694161ec47" @@ -4805,6 +4865,20 @@ safe-regex@^1.1.0: version "2.1.2" resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" +sane@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/sane/-/sane-4.0.1.tgz#af1e10466e924e1b888c104bb9925a0f1beb46dd" + dependencies: + anymatch "^2.0.0" + capture-exit "^1.2.0" + exec-sh "^0.2.0" + execa "^1.0.0" + fb-watchman "^2.0.0" + micromatch "^3.1.4" + minimist "^1.1.1" + walker "~1.0.5" + watch "~0.18.0" + sax@^1.2.4, sax@~1.2.4: version "1.2.4" resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" @@ -5303,6 +5377,10 @@ timsort@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/timsort/-/timsort-0.3.0.tgz#405411a8e7e6339fe64db9a234de11dc31e02bd4" +tmpl@1.0.x: + version "1.0.4" + resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" + to-arraybuffer@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" @@ -5568,6 +5646,19 @@ vue@^2.5.17: version "2.5.17" resolved "https://registry.yarnpkg.com/vue/-/vue-2.5.17.tgz#0f8789ad718be68ca1872629832ed533589c6ada" +walker@~1.0.5: + version "1.0.7" + resolved "https://registry.yarnpkg.com/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb" + dependencies: + makeerror "1.0.x" + +watch@~0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986" + dependencies: + exec-sh "^0.2.0" + minimist "^1.2.0" + watchpack@^1.5.0: version "1.6.0" resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00" From ae789c7657d020052f020f21acfe798057ae357f Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 11 Oct 2018 13:37:41 -0400 Subject: [PATCH 07/15] Cast to bool Signed-off-by: Andrew Welch --- src/variables/ManifestVariable.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/variables/ManifestVariable.php b/src/variables/ManifestVariable.php index a2bd1491..2e22336d 100644 --- a/src/variables/ManifestVariable.php +++ b/src/variables/ManifestVariable.php @@ -46,7 +46,7 @@ public function __construct() self::$config['server']['manifestPath'] = Craft::getAlias($bundle->sourcePath); $useDevServer = getenv('NYS_PLUGIN_DEVSERVER'); if ($useDevServer !== false) { - self::$config['useDevServer'] = $useDevServer; + self::$config['useDevServer'] = (bool)$useDevServer; } } From 219d02934856bc7c4a537c356731091719fc4776 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 11 Oct 2018 13:37:54 -0400 Subject: [PATCH 08/15] Updated build assets Signed-off-by: Andrew Welch --- .../dist/css/styles.65ba50b25e380b66f7e8.css | 10 +++++----- .../dist/css/styles.65ba50b25e380b66f7e8.css.map | 2 +- .../dist/js/confetti-legacy.5d948a89718ce1513bbf.js | 10 +++++----- .../dist/js/confetti.2e5d2697902ba017c06c.js | 10 +++++----- .../js/imageoptimize-legacy.87b0e6f8f369dd383e50.js | 10 +++++----- .../dist/js/imageoptimize.9c93c7adbc5301abd3de.js | 10 +++++----- .../dist/js/styles-legacy.65ba50b25e380b66f7e8.js | 10 +++++----- ...vendors~confetti~vue-legacy.0d9acfb2213ba26e8362.js | 10 +++++----- .../js/vendors~confetti~vue.fdc3565b6903d8b98227.js | 10 +++++----- .../dist/js/welcome-legacy.20edbd50eb9808fbe74c.js | 10 +++++----- .../dist/js/welcome.b6d10ff0a896334db208.js | 10 +++++----- 11 files changed, 51 insertions(+), 51 deletions(-) diff --git a/src/assetbundles/imageoptimize/dist/css/styles.65ba50b25e380b66f7e8.css b/src/assetbundles/imageoptimize/dist/css/styles.65ba50b25e380b66f7e8.css index ba1a2f91..9c984c93 100644 --- a/src/assetbundles/imageoptimize/dist/css/styles.65ba50b25e380b66f7e8.css +++ b/src/assetbundles/imageoptimize/dist/css/styles.65ba50b25e380b66f7e8.css @@ -1,10 +1,10 @@ /*! - * @project nystudio107 + * @project undefined * @name styles.65ba50b25e380b66f7e8.css - * @author andrew@nystudio107.com - * @build Thu, Oct 4, 2018 5:12 PM ET - * @release b8485da33957e4e7c0f54eacee1646a799401098 [develop] - * @copyright Copyright (c) 2018 nystudio107 + * @author Andrew Welch + * @build Thu, Oct 11, 2018 5:35 PM ET + * @release f7a63ad48c66c791df31f2749a57069166c2c720 [develop] + * @copyright Copyright (c) 2018 undefined * */table.image-optimize{table-layout:fixed}.image-optimize h2{font-weight:700;color:#29323d}table.data thead th.io-format-column,table.data thead th.io-name-column{width:20%}table.data thead th.io-command-column,table.data thead th.io-installed-column{width:50%}.block{display:block}.inline-block{display:inline-block}.table{display:table}.hidden{display:none}.relative{position:relative}.uppercase{text-transform:uppercase} /*# sourceMappingURL=styles.65ba50b25e380b66f7e8.css.map */ \ No newline at end of file diff --git a/src/assetbundles/imageoptimize/dist/css/styles.65ba50b25e380b66f7e8.css.map b/src/assetbundles/imageoptimize/dist/css/styles.65ba50b25e380b66f7e8.css.map index c6235881..7d19871b 100644 --- a/src/assetbundles/imageoptimize/dist/css/styles.65ba50b25e380b66f7e8.css.map +++ b/src/assetbundles/imageoptimize/dist/css/styles.65ba50b25e380b66f7e8.css.map @@ -1 +1 @@ -{"version":3,"sources":["styles.65ba50b25e380b66f7e8.css"],"names":[],"mappings":"AAAA;;;;;;;;GAQG,AAuDH,qBACE,kBAAoB,CACrB,AAED,mBACE,gBAAkB,AAClB,aAAe,CAChB,AAMD,wEACE,SAAW,CACZ,AAMD,8EACE,SAAW,CACZ,AAQD,OACE,aAAe,CAChB,AAED,cACE,oBAAsB,CACvB,AAED,OACE,aAAe,CAChB,AAED,QACE,YAAc,CACf,AAED,UACE,iBAAmB,CACpB,AAED,WACE,wBAA0B,CAC3B","file":"styles.65ba50b25e380b66f7e8.css","sourcesContent":["/*!\n * @project nystudio107\n * @name styles.65ba50b25e380b66f7e8.css\n * @author andrew@nystudio107.com\n * @build Thu, Oct 4, 2018 5:12 PM ET\n * @release b8485da33957e4e7c0f54eacee1646a799401098 [develop]\n * @copyright Copyright (c) 2018 nystudio107\n *\n */\n\n/**\n * app.css\n *\n * The entry point for the css.\n *\n */\n\n/**\n * This injects Tailwind's base styles, which is a combination of\n * Normalize.css and some additional base styles.\n *\n * You can see the styles here:\n * https://github.com/tailwindcss/tailwindcss/blob/master/css/preflight.css\n */\n\n/**\n * We don't want these in the AdminCP\n * @import \"tailwindcss/preflight\";\n */\n\n/**\n * This injects any component classes registered by plugins.\n *\n */\n\n/**\n * Here we add custom component classes; stuff we want loaded\n * *before* the utilities so that the utilities can still\n * override them.\n *\n */\n\n/**\n * components/webfonts.css\n * \n * Project webfonts.\n *\n */\n\n/**\n * components/typography.css\n * \n * Typography rules.\n *\n */\n\n/**\n * components/global.css\n *\n * Project-wide styles\n *\n */\n\ntable.image-optimize {\n table-layout: fixed;\n}\n\n.image-optimize h2 {\n font-weight: bold;\n color: #29323d;\n}\n\ntable.data thead th.io-format-column {\n width: 20%;\n}\n\ntable.data thead th.io-name-column {\n width: 20%;\n}\n\ntable.data thead th.io-command-column {\n width: 50%;\n}\n\ntable.data thead th.io-installed-column {\n width: 50%;\n}\n\n/**\n * This injects all of Tailwind's utility classes, generated based on your\n * config file.\n *\n */\n\n.block {\n display: block;\n}\n\n.inline-block {\n display: inline-block;\n}\n\n.table {\n display: table;\n}\n\n.hidden {\n display: none;\n}\n\n.relative {\n position: relative;\n}\n\n.uppercase {\n text-transform: uppercase;\n}\n\n/**\n * Include styles for individual pages\n *\n */\n\n/**\n * pages/settings.pcss\n *\n * Styles for the Settings page.\n *\n */\n\n/**\n * Include vendor css.\n *\n */\n\n/**\n * vendor.css\n * \n * All vendor CSS is imported here.\n *\n */\n\n"]} \ No newline at end of file +{"version":3,"sources":["styles.65ba50b25e380b66f7e8.css"],"names":[],"mappings":"AAAA;;;;;;;;GAQG,AAuDH,qBACE,kBAAoB,CACrB,AAED,mBACE,gBAAkB,AAClB,aAAe,CAChB,AAMD,wEACE,SAAW,CACZ,AAMD,8EACE,SAAW,CACZ,AAQD,OACE,aAAe,CAChB,AAED,cACE,oBAAsB,CACvB,AAED,OACE,aAAe,CAChB,AAED,QACE,YAAc,CACf,AAED,UACE,iBAAmB,CACpB,AAED,WACE,wBAA0B,CAC3B","file":"styles.65ba50b25e380b66f7e8.css","sourcesContent":["/*!\n * @project undefined\n * @name styles.65ba50b25e380b66f7e8.css\n * @author Andrew Welch\n * @build Thu, Oct 11, 2018 5:35 PM ET\n * @release f7a63ad48c66c791df31f2749a57069166c2c720 [develop]\n * @copyright Copyright (c) 2018 undefined\n *\n */\n\n/**\n * app.css\n *\n * The entry point for the css.\n *\n */\n\n/**\n * This injects Tailwind's base styles, which is a combination of\n * Normalize.css and some additional base styles.\n *\n * You can see the styles here:\n * https://github.com/tailwindcss/tailwindcss/blob/master/css/preflight.css\n */\n\n/**\n * We don't want these in the AdminCP\n * @import \"tailwindcss/preflight\";\n */\n\n/**\n * This injects any component classes registered by plugins.\n *\n */\n\n/**\n * Here we add custom component classes; stuff we want loaded\n * *before* the utilities so that the utilities can still\n * override them.\n *\n */\n\n/**\n * components/webfonts.css\n * \n * Project webfonts.\n *\n */\n\n/**\n * components/typography.css\n * \n * Typography rules.\n *\n */\n\n/**\n * components/global.css\n *\n * Project-wide styles\n *\n */\n\ntable.image-optimize {\n table-layout: fixed;\n}\n\n.image-optimize h2 {\n font-weight: bold;\n color: #29323d;\n}\n\ntable.data thead th.io-format-column {\n width: 20%;\n}\n\ntable.data thead th.io-name-column {\n width: 20%;\n}\n\ntable.data thead th.io-command-column {\n width: 50%;\n}\n\ntable.data thead th.io-installed-column {\n width: 50%;\n}\n\n/**\n * This injects all of Tailwind's utility classes, generated based on your\n * config file.\n *\n */\n\n.block {\n display: block;\n}\n\n.inline-block {\n display: inline-block;\n}\n\n.table {\n display: table;\n}\n\n.hidden {\n display: none;\n}\n\n.relative {\n position: relative;\n}\n\n.uppercase {\n text-transform: uppercase;\n}\n\n/**\n * Include styles for individual pages\n *\n */\n\n/**\n * pages/settings.pcss\n *\n * Styles for the Settings page.\n *\n */\n\n/**\n * Include vendor css.\n *\n */\n\n/**\n * vendor.css\n * \n * All vendor CSS is imported here.\n *\n */\n\n"]} \ No newline at end of file diff --git a/src/assetbundles/imageoptimize/dist/js/confetti-legacy.5d948a89718ce1513bbf.js b/src/assetbundles/imageoptimize/dist/js/confetti-legacy.5d948a89718ce1513bbf.js index 85e42f90..c997ddcb 100644 --- a/src/assetbundles/imageoptimize/dist/js/confetti-legacy.5d948a89718ce1513bbf.js +++ b/src/assetbundles/imageoptimize/dist/js/confetti-legacy.5d948a89718ce1513bbf.js @@ -1,10 +1,10 @@ /*! - * @project nystudio107 + * @project undefined * @name confetti-legacy.5d948a89718ce1513bbf.js - * @author andrew@nystudio107.com - * @build Thu, Oct 4, 2018 5:12 PM ET - * @release b8485da33957e4e7c0f54eacee1646a799401098 [develop] - * @copyright Copyright (c) 2018 nystudio107 + * @author Andrew Welch + * @build Thu, Oct 11, 2018 5:35 PM ET + * @release f7a63ad48c66c791df31f2749a57069166c2c720 [develop] + * @copyright Copyright (c) 2018 undefined * */ (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{10:function(t,i,e){"use strict";function n(t,i,e,n,s,a,r,o){var h,c="function"==typeof t?t.options:t;if(i&&(c.render=i,c.staticRenderFns=e,c._compiled=!0),n&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),r?(h=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=h):s&&(h=o?function(){s.call(this,this.$root.$options.shadowRoot)}:s),h)if(c.functional){c._injectStyles=h;var l=c.render;c.render=function(t,i){return h.call(i),l(t,i)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,h):[h]}return{exports:t,options:c}}e.d(i,"a",function(){return n})},9:function(t,i,e){t.exports=function(t){function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}var e={};return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="",i(i.s=0)}([function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e(1);e.d(i,"Confetti",function(){return n.a}),i.default={install:function(t,i){this.installed||(this.installed=!0,t.prototype.$confetti=new n.a(i))}}},function(t,i,e){"use strict";var n=e(2),s=function(){function t(t,i){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{};this.particles=new n.a({ctx:this.ctx,W:this.W,H:this.H,wind:this.wind,windPosCoef:this.windPosCoef,windSpeedMax:this.windSpeedMax,count:0,shape:t.shape||"circle",colors:{opts:t.colors||["DodgerBlue","OliveDrab","Gold","pink","SlateBlue","lightblue","Violet","PaleGreen","SteelBlue","SandyBrown","Chocolate","Crimson"],idx:0,step:10,get color(){return this.opts[(this.idx++/this.step|0)%this.opts.length]}}})}},{key:"createContext",value:function(){this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.canvas.style.display="block",this.canvas.style.position="fixed",this.canvas.style.pointerEvents="none",this.canvas.style.top=0,this.canvas.style.width="100vw",this.canvas.style.height="100vh",this.canvas.id="confetti-canvas",document.querySelector("body").appendChild(this.canvas)}},{key:"start",value:function(t){this.ctx||this.createContext(),this.animationId&&cancelAnimationFrame(this.animationId),this.createParticles(t),this.updateDimensions(),this.particlesPerFrame=this.maxParticlesPerFrame,this.animationId=requestAnimationFrame(this.mainLoop.bind(this)),window.addEventListener("resize",this.onResizeCallback)}},{key:"stop",value:function(){this.particlesPerFrame=0,window.removeEventListener("resize",this.onResizeCallback)}},{key:"remove",value:function(){this.stop(),this.animationId&&cancelAnimationFrame(this.animationId),this.canvas&&document.body.removeChild(this.canvas),this.initialize()}},{key:"updateDimensions",value:function(){this.W===window.innerWidth&&this.H===window.innerHeight||(this.W=this.particles.opts.W=this.canvas.width=window.innerWidth,this.H=this.particles.opts.H=this.canvas.height=window.innerHeight)}},{key:"mainLoop",value:function(t){for(this.updateDimensions(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.W,this.H),this.windSpeed=Math.sin(t/8e3)*this.windSpeedMax,this.wind=this.particles.opts.wind+=this.windChange;this.droppedCount0?this.items.push(this.pool.pop().setup(this.opts)):this.items.push((new n.a).setup(this.opts))}}]),t}();i.a=a},function(t,i,e){"use strict";var n=function(){function t(t,i){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:t+(t=0);return Math.random()*(i-t)+t|0}},{key:"rand",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t+(t=0);return Math.random()*(i-t)+t}},{key:"update",value:function(){return this.tiltAngle+=this.tiltAngleIncremental*(.2*Math.cos(this.wind+(this.d+this.x+this.y)*this.windPosCoef)+1),this.y+=(Math.cos(this.angle+this.d)+3+this.r/2)/2,this.x+=Math.sin(this.angle),this.x+=Math.cos(this.wind+(this.d+this.x+this.y)*this.windPosCoef)*this.windSpeedMax,this.y+=Math.sin(this.wind+(this.d+this.x+this.y)*this.windPosCoef)*this.windSpeedMax,this.tilt=15*Math.sin(this.tiltAngle-this.count/3),this.y>this.H}},{key:"drawCircle",value:function(){this.ctx.arc(0,0,this.r/2,0,2*Math.PI,!1),this.ctx.fill()}},{key:"drawRect",value:function(){this.ctx.fillRect(0,0,this.r,this.r/2)}},{key:"drawHeart",value:function(){var t=this,i=function(i,e,n,s,a,r){t.ctx.bezierCurveTo(i/t.r*2,e/t.r*2,n/t.r*2,s/t.r*2,a/t.r*2,r/t.r*2)};this.ctx.moveTo(37.5/this.r,20/this.r),i(75,37,70,25,50,25),i(20,25,20,62.5,20,62.5),i(20,80,40,102,75,120),i(110,102,130,80,130,62.5),i(130,62.5,130,25,100,25),i(85,25,75,37,75,40),this.ctx.fill()}},{key:"draw",value:function(){this.ctx.fillStyle=this.color,this.ctx.beginPath(),this.ctx.setTransform(Math.cos(this.tiltAngle),Math.sin(this.tiltAngle),0,1,this.x,this.y),"circle"===this.shape?this.drawCircle():"rect"===this.shape?this.drawRect():"heart"===this.shape&&this.drawHeart()}}]),t}();i.a=s}])}}]); diff --git a/src/assetbundles/imageoptimize/dist/js/confetti.2e5d2697902ba017c06c.js b/src/assetbundles/imageoptimize/dist/js/confetti.2e5d2697902ba017c06c.js index 0b80e9ea..d3f85045 100644 --- a/src/assetbundles/imageoptimize/dist/js/confetti.2e5d2697902ba017c06c.js +++ b/src/assetbundles/imageoptimize/dist/js/confetti.2e5d2697902ba017c06c.js @@ -1,10 +1,10 @@ /*! - * @project nystudio107 + * @project undefined * @name confetti.2e5d2697902ba017c06c.js - * @author andrew@nystudio107.com - * @build Thu, Oct 4, 2018 5:12 PM ET - * @release b8485da33957e4e7c0f54eacee1646a799401098 [develop] - * @copyright Copyright (c) 2018 nystudio107 + * @author Andrew Welch + * @build Thu, Oct 11, 2018 5:35 PM ET + * @release f7a63ad48c66c791df31f2749a57069166c2c720 [develop] + * @copyright Copyright (c) 2018 undefined * */ (window.webpackJsonp=window.webpackJsonp||[]).push([[3],{4:function(t,i,e){"use strict";e.r(i);var n=function(){var t=this.$createElement;return(this._self._c||t)("main")};n._withStripped=!0;var s=e(3),a=e(9),r=e.n(a);s.default.use(r.a);var o=function(t,i,e,n,s,a,r,o){var h,c="function"==typeof t?t.options:t;if(i&&(c.render=i,c.staticRenderFns=e,c._compiled=!0),n&&(c.functional=!0),a&&(c._scopeId="data-v-"+a),r?(h=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),s&&s.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=h):s&&(h=o?function(){s.call(this,this.$root.$options.shadowRoot)}:s),h)if(c.functional){c._injectStyles=h;var l=c.render;c.render=function(t,i){return h.call(i),l(t,i)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,h):[h]}return{exports:t,options:c}}({mounted:function(){this.$confetti.start(),setTimeout(()=>{this.$confetti.stop()},5e3)},methods:{}},n,[],!1,null,null,null);o.options.__file="src/assetbundles/imageoptimize/src/vue/Confetti.vue";i.default=o.exports},9:function(t,i,e){t.exports=function(t){function i(n){if(e[n])return e[n].exports;var s=e[n]={i:n,l:!1,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.l=!0,s.exports}var e={};return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},i.p="",i(i.s=0)}([function(t,i,e){"use strict";Object.defineProperty(i,"__esModule",{value:!0});var n=e(1);e.d(i,"Confetti",function(){return n.a}),i.default={install:function(t,i){this.installed||(this.installed=!0,t.prototype.$confetti=new n.a(i))}}},function(t,i,e){"use strict";var n=e(2),s=function(){function t(t,i){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:{};this.particles=new n.a({ctx:this.ctx,W:this.W,H:this.H,wind:this.wind,windPosCoef:this.windPosCoef,windSpeedMax:this.windSpeedMax,count:0,shape:t.shape||"circle",colors:{opts:t.colors||["DodgerBlue","OliveDrab","Gold","pink","SlateBlue","lightblue","Violet","PaleGreen","SteelBlue","SandyBrown","Chocolate","Crimson"],idx:0,step:10,get color(){return this.opts[(this.idx++/this.step|0)%this.opts.length]}}})}},{key:"createContext",value:function(){this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.canvas.style.display="block",this.canvas.style.position="fixed",this.canvas.style.pointerEvents="none",this.canvas.style.top=0,this.canvas.style.width="100vw",this.canvas.style.height="100vh",this.canvas.id="confetti-canvas",document.querySelector("body").appendChild(this.canvas)}},{key:"start",value:function(t){this.ctx||this.createContext(),this.animationId&&cancelAnimationFrame(this.animationId),this.createParticles(t),this.updateDimensions(),this.particlesPerFrame=this.maxParticlesPerFrame,this.animationId=requestAnimationFrame(this.mainLoop.bind(this)),window.addEventListener("resize",this.onResizeCallback)}},{key:"stop",value:function(){this.particlesPerFrame=0,window.removeEventListener("resize",this.onResizeCallback)}},{key:"remove",value:function(){this.stop(),this.animationId&&cancelAnimationFrame(this.animationId),this.canvas&&document.body.removeChild(this.canvas),this.initialize()}},{key:"updateDimensions",value:function(){this.W===window.innerWidth&&this.H===window.innerHeight||(this.W=this.particles.opts.W=this.canvas.width=window.innerWidth,this.H=this.particles.opts.H=this.canvas.height=window.innerHeight)}},{key:"mainLoop",value:function(t){for(this.updateDimensions(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.W,this.H),this.windSpeed=Math.sin(t/8e3)*this.windSpeedMax,this.wind=this.particles.opts.wind+=this.windChange;this.droppedCount0?this.items.push(this.pool.pop().setup(this.opts)):this.items.push((new n.a).setup(this.opts))}}]),t}();i.a=a},function(t,i,e){"use strict";var n=function(){function t(t,i){for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:t+(t=0);return Math.random()*(i-t)+t|0}},{key:"rand",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t+(t=0);return Math.random()*(i-t)+t}},{key:"update",value:function(){return this.tiltAngle+=this.tiltAngleIncremental*(.2*Math.cos(this.wind+(this.d+this.x+this.y)*this.windPosCoef)+1),this.y+=(Math.cos(this.angle+this.d)+3+this.r/2)/2,this.x+=Math.sin(this.angle),this.x+=Math.cos(this.wind+(this.d+this.x+this.y)*this.windPosCoef)*this.windSpeedMax,this.y+=Math.sin(this.wind+(this.d+this.x+this.y)*this.windPosCoef)*this.windSpeedMax,this.tilt=15*Math.sin(this.tiltAngle-this.count/3),this.y>this.H}},{key:"drawCircle",value:function(){this.ctx.arc(0,0,this.r/2,0,2*Math.PI,!1),this.ctx.fill()}},{key:"drawRect",value:function(){this.ctx.fillRect(0,0,this.r,this.r/2)}},{key:"drawHeart",value:function(){var t=this,i=function(i,e,n,s,a,r){t.ctx.bezierCurveTo(i/t.r*2,e/t.r*2,n/t.r*2,s/t.r*2,a/t.r*2,r/t.r*2)};this.ctx.moveTo(37.5/this.r,20/this.r),i(75,37,70,25,50,25),i(20,25,20,62.5,20,62.5),i(20,80,40,102,75,120),i(110,102,130,80,130,62.5),i(130,62.5,130,25,100,25),i(85,25,75,37,75,40),this.ctx.fill()}},{key:"draw",value:function(){this.ctx.fillStyle=this.color,this.ctx.beginPath(),this.ctx.setTransform(Math.cos(this.tiltAngle),Math.sin(this.tiltAngle),0,1,this.x,this.y),"circle"===this.shape?this.drawCircle():"rect"===this.shape?this.drawRect():"heart"===this.shape&&this.drawHeart()}}]),t}();i.a=s}])}}]); diff --git a/src/assetbundles/imageoptimize/dist/js/imageoptimize-legacy.87b0e6f8f369dd383e50.js b/src/assetbundles/imageoptimize/dist/js/imageoptimize-legacy.87b0e6f8f369dd383e50.js index fe682dd0..7b474f2e 100644 --- a/src/assetbundles/imageoptimize/dist/js/imageoptimize-legacy.87b0e6f8f369dd383e50.js +++ b/src/assetbundles/imageoptimize/dist/js/imageoptimize-legacy.87b0e6f8f369dd383e50.js @@ -1,10 +1,10 @@ /*! - * @project nystudio107 + * @project undefined * @name imageoptimize-legacy.87b0e6f8f369dd383e50.js - * @author andrew@nystudio107.com - * @build Thu, Oct 4, 2018 5:12 PM ET - * @release b8485da33957e4e7c0f54eacee1646a799401098 [develop] - * @copyright Copyright (c) 2018 nystudio107 + * @author Andrew Welch + * @build Thu, Oct 11, 2018 5:35 PM ET + * @release f7a63ad48c66c791df31f2749a57069166c2c720 [develop] + * @copyright Copyright (c) 2018 undefined * */!function(t){function r(r){for(var n,a,u=r[0],c=r[1],f=r[2],l=0,h=[];l=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=e(3),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}},function(t,r){!function(r){"use strict";var e,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",f="object"==typeof t,s=r.regeneratorRuntime;if(s)f&&(t.exports=s);else{(s=r.regeneratorRuntime=f?t.exports:{}).wrap=b;var l="suspendedStart",h="suspendedYield",p="executing",y="completed",v={},d={};d[a]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(R([])));m&&m!==n&&o.call(m,a)&&(d=m);var w=j.prototype=L.prototype=Object.create(d);O.prototype=w.constructor=j,j.constructor=O,j[c]=O.displayName="GeneratorFunction",s.isGeneratorFunction=function(t){var r="function"==typeof t&&t.constructor;return!!r&&(r===O||"GeneratorFunction"===(r.displayName||r.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,j):(t.__proto__=j,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(w),t},s.awrap=function(t){return{__await:t}},E(_.prototype),_.prototype[u]=function(){return this},s.AsyncIterator=_,s.async=function(t,r,e,n){var o=new _(b(t,r,e,n));return s.isGeneratorFunction(r)?o:o.next().then(function(t){return t.done?t.value:o.next()})},E(w),w[c]="Generator",w[a]=function(){return this},w.toString=function(){return"[object Generator]"},s.keys=function(t){var r=[];for(var e in t)r.push(e);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},s.values=R,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(S),!t)for(var r in this)"t"===r.charAt(0)&&o.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),f=o.call(a,"finallyLoc");if(c&&f){if(this.prev=0;--e){var n=this.tryEntries[e];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--r){var e=this.tryEntries[r];if(e.finallyLoc===t)return this.complete(e.completion,e.afterLoc),S(e),v}},catch:function(t){for(var r=this.tryEntries.length-1;r>=0;--r){var e=this.tryEntries[r];if(e.tryLoc===t){var n=e.completion;if("throw"===n.type){var o=n.arg;S(e)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:R(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}}}function b(t,r,e,n){var o=r&&r.prototype instanceof L?r:L,i=Object.create(o.prototype),a=new N(n||[]);return i._invoke=function(t,r,e){var n=l;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===y){if("throw"===o)throw i;return G()}for(e.method=o,e.arg=i;;){var a=e.delegate;if(a){var u=P(a,e);if(u){if(u===v)continue;return u}}if("next"===e.method)e.sent=e._sent=e.arg;else if("throw"===e.method){if(n===l)throw n=y,e.arg;e.dispatchException(e.arg)}else"return"===e.method&&e.abrupt("return",e.arg);n=p;var c=x(t,r,e);if("normal"===c.type){if(n=e.done?y:h,c.arg===v)continue;return{value:c.arg,done:e.done}}"throw"===c.type&&(n=y,e.method="throw",e.arg=c.arg)}}}(t,e,a),i}function x(t,r,e){try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:"throw",arg:t}}}function L(){}function O(){}function j(){}function E(t){["next","throw","return"].forEach(function(r){t[r]=function(t){return this._invoke(r,t)}})}function _(t){var r;this._invoke=function(e,n){function i(){return new Promise(function(r,i){!function r(e,n,i,a){var u=x(t[e],t,n);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&o.call(f,"__await")?Promise.resolve(f.__await).then(function(t){r("next",t,i,a)},function(t){r("throw",t,i,a)}):Promise.resolve(f).then(function(t){c.value=t,i(c)},function(t){return r("throw",t,i,a)})}a(u.arg)}(e,n,r,i)})}return r=r?r.then(i,i):i()}}function P(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=x(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(t){var r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r.finallyLoc=t[2],r.afterLoc=t[3]),this.tryEntries.push(r)}function S(t){var r=t.completion||{};r.type="normal",delete r.arg,t.completion=r}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function R(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n{})().then(e=>{})},function(e,t){}]); //# sourceMappingURL=imageoptimize.9c93c7adbc5301abd3de.js.map \ No newline at end of file diff --git a/src/assetbundles/imageoptimize/dist/js/styles-legacy.65ba50b25e380b66f7e8.js b/src/assetbundles/imageoptimize/dist/js/styles-legacy.65ba50b25e380b66f7e8.js index 8cad3839..b53a7504 100644 --- a/src/assetbundles/imageoptimize/dist/js/styles-legacy.65ba50b25e380b66f7e8.js +++ b/src/assetbundles/imageoptimize/dist/js/styles-legacy.65ba50b25e380b66f7e8.js @@ -1,10 +1,10 @@ /*! - * @project nystudio107 + * @project undefined * @name styles-legacy.65ba50b25e380b66f7e8.js - * @author andrew@nystudio107.com - * @build Thu, Oct 4, 2018 5:12 PM ET - * @release b8485da33957e4e7c0f54eacee1646a799401098 [develop] - * @copyright Copyright (c) 2018 nystudio107 + * @author Andrew Welch + * @build Thu, Oct 11, 2018 5:35 PM ET + * @release f7a63ad48c66c791df31f2749a57069166c2c720 [develop] + * @copyright Copyright (c) 2018 undefined * */ (window.webpackJsonp=window.webpackJsonp||[]).push([[0],{11:function(t,e,n){"use strict";n.r(e);var i=function(){var t=this.$createElement;return(this._self._c||t)("main")};i._withStripped=!0;var s=n(4),o=n(9),u=n.n(o);s.default.use(u.a);var a={mounted:function(){var t=this;this.$confetti.start(),setTimeout(function(){t.$confetti.stop()},5e3)},methods:{}},c=n(10),r=Object(c.a)(a,i,[],!1,null,null,null);r.options.__file="src/assetbundles/imageoptimize/src/vue/Confetti.vue";e.default=r.exports},6:function(t,e,n){}}]); diff --git a/src/assetbundles/imageoptimize/dist/js/vendors~confetti~vue-legacy.0d9acfb2213ba26e8362.js b/src/assetbundles/imageoptimize/dist/js/vendors~confetti~vue-legacy.0d9acfb2213ba26e8362.js index ea1a9a27..0d80386f 100644 --- a/src/assetbundles/imageoptimize/dist/js/vendors~confetti~vue-legacy.0d9acfb2213ba26e8362.js +++ b/src/assetbundles/imageoptimize/dist/js/vendors~confetti~vue-legacy.0d9acfb2213ba26e8362.js @@ -1,10 +1,10 @@ /*! - * @project nystudio107 + * @project undefined * @name vendors~confetti~vue-legacy.0d9acfb2213ba26e8362.js - * @author andrew@nystudio107.com - * @build Thu, Oct 4, 2018 5:12 PM ET - * @release b8485da33957e4e7c0f54eacee1646a799401098 [develop] - * @copyright Copyright (c) 2018 nystudio107 + * @author Andrew Welch + * @build Thu, Oct 11, 2018 5:35 PM ET + * @release f7a63ad48c66c791df31f2749a57069166c2c720 [develop] + * @copyright Copyright (c) 2018 undefined * */ (window.webpackJsonp=window.webpackJsonp||[]).push([[1],[,,,,function(e,t,n){"use strict";n.r(t),function(e,n){ diff --git a/src/assetbundles/imageoptimize/dist/js/vendors~confetti~vue.fdc3565b6903d8b98227.js b/src/assetbundles/imageoptimize/dist/js/vendors~confetti~vue.fdc3565b6903d8b98227.js index b204b229..ae23413a 100644 --- a/src/assetbundles/imageoptimize/dist/js/vendors~confetti~vue.fdc3565b6903d8b98227.js +++ b/src/assetbundles/imageoptimize/dist/js/vendors~confetti~vue.fdc3565b6903d8b98227.js @@ -1,10 +1,10 @@ /*! - * @project nystudio107 + * @project undefined * @name vendors~confetti~vue.fdc3565b6903d8b98227.js - * @author andrew@nystudio107.com - * @build Thu, Oct 4, 2018 5:12 PM ET - * @release b8485da33957e4e7c0f54eacee1646a799401098 [develop] - * @copyright Copyright (c) 2018 nystudio107 + * @author Andrew Welch + * @build Thu, Oct 11, 2018 5:35 PM ET + * @release f7a63ad48c66c791df31f2749a57069166c2c720 [develop] + * @copyright Copyright (c) 2018 undefined * */ (window.webpackJsonp=window.webpackJsonp||[]).push([[0],[,,,function(e,t,n){"use strict";n.r(t),function(e,n){ diff --git a/src/assetbundles/imageoptimize/dist/js/welcome-legacy.20edbd50eb9808fbe74c.js b/src/assetbundles/imageoptimize/dist/js/welcome-legacy.20edbd50eb9808fbe74c.js index 80fe4691..9267436a 100644 --- a/src/assetbundles/imageoptimize/dist/js/welcome-legacy.20edbd50eb9808fbe74c.js +++ b/src/assetbundles/imageoptimize/dist/js/welcome-legacy.20edbd50eb9808fbe74c.js @@ -1,10 +1,10 @@ /*! - * @project nystudio107 + * @project undefined * @name welcome-legacy.20edbd50eb9808fbe74c.js - * @author andrew@nystudio107.com - * @build Thu, Oct 4, 2018 5:12 PM ET - * @release b8485da33957e4e7c0f54eacee1646a799401098 [develop] - * @copyright Copyright (c) 2018 nystudio107 + * @author Andrew Welch + * @build Thu, Oct 11, 2018 5:35 PM ET + * @release f7a63ad48c66c791df31f2749a57069166c2c720 [develop] + * @copyright Copyright (c) 2018 undefined * */!function(t){function e(e){for(var r,n,i=e[0],a=e[1],u=0,c=[];u=0,i=o&&n.regeneratorRuntime;if(n.regeneratorRuntime=void 0,t.exports=r(3),o)n.regeneratorRuntime=i;else try{delete n.regeneratorRuntime}catch(t){n.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var r,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag",f="object"==typeof t,s=e.regeneratorRuntime;if(s)f&&(t.exports=s);else{(s=e.regeneratorRuntime=f?t.exports:{}).wrap=b;var l="suspendedStart",h="suspendedYield",p="executing",d="completed",y={},v={};v[a]=function(){return this};var g=Object.getPrototypeOf,m=g&&g(g(T([])));m&&m!==n&&o.call(m,a)&&(v=m);var w=j.prototype=E.prototype=Object.create(v);L.prototype=w.constructor=j,j.constructor=L,j[c]=L.displayName="GeneratorFunction",s.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===L||"GeneratorFunction"===(e.displayName||e.name))},s.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,j):(t.__proto__=j,c in t||(t[c]="GeneratorFunction")),t.prototype=Object.create(w),t},s.awrap=function(t){return{__await:t}},O(_.prototype),_.prototype[u]=function(){return this},s.AsyncIterator=_,s.async=function(t,e,r,n){var o=new _(b(t,e,r,n));return s.isGeneratorFunction(e)?o:o.next().then(function(t){return t.done?t.value:o.next()})},O(w),w[c]="Generator",w[a]=function(){return this},w.toString=function(){return"[object Generator]"},s.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},s.values=T,S.prototype={constructor:S,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(N),!t)for(var e in this)"t"===e.charAt(0)&&o.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=r)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function n(n,o){return u.type="throw",u.arg=t,e.next=n,o&&(e.method="next",e.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),f=o.call(a,"finallyLoc");if(c&&f){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),N(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;N(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,n){return this.delegate={iterator:T(t),resultName:e,nextLoc:n},"next"===this.method&&(this.arg=r),y}}}function b(t,e,r,n){var o=e&&e.prototype instanceof E?e:E,i=Object.create(o.prototype),a=new S(n||[]);return i._invoke=function(t,e,r){var n=l;return function(o,i){if(n===p)throw new Error("Generator is already running");if(n===d){if("throw"===o)throw i;return R()}for(r.method=o,r.arg=i;;){var a=r.delegate;if(a){var u=P(a,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===l)throw n=d,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=x(t,e,r);if("normal"===c.type){if(n=r.done?d:h,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=d,r.method="throw",r.arg=c.arg)}}}(t,r,a),i}function x(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}function E(){}function L(){}function j(){}function O(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function _(t){var e;this._invoke=function(r,n){function i(){return new Promise(function(e,i){!function e(r,n,i,a){var u=x(t[r],t,n);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==typeof f&&o.call(f,"__await")?Promise.resolve(f.__await).then(function(t){e("next",t,i,a)},function(t){e("throw",t,i,a)}):Promise.resolve(f).then(function(t){c.value=t,i(c)},function(t){return e("throw",t,i,a)})}a(u.arg)}(r,n,e,i)})}return e=e?e.then(i,i):i()}}function P(t,e){var n=t.iterator[e.method];if(n===r){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=r,P(t,e),"throw"===e.method))return y;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=x(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,y;var i=o.arg;return i?i.done?(e[t.resultName]=i.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=r),e.delegate=null,y):i:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,y)}function k(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function N(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(k,this),this.reset(!0)}function T(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function e(){for(;++n{new((await n.e(0).then(n.bind(null,3))).default)({el:"#cp-nav-content",delimiters:["${","}"],components:{confetti:()=>Promise.all([n.e(0),n.e(3)]).then(n.bind(null,4))},data:{},methods:{},mounted(){}})})().then(e=>{})}}); //# sourceMappingURL=welcome.b6d10ff0a896334db208.js.map \ No newline at end of file From 44128341afce95fa30fa4de1b48807c9612e782d Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 11 Oct 2018 17:11:59 -0400 Subject: [PATCH 09/15] Added a link to the **variant does not exist** to aid in diagnosing what is wrong Signed-off-by: Andrew Welch --- src/variables/ManifestVariable.php | 54 +++++++++++++++++++++++++++--- 1 file changed, 49 insertions(+), 5 deletions(-) diff --git a/src/variables/ManifestVariable.php b/src/variables/ManifestVariable.php index 2e22336d..2c2f72d5 100644 --- a/src/variables/ManifestVariable.php +++ b/src/variables/ManifestVariable.php @@ -55,23 +55,37 @@ public function __construct() * @param bool $async * @param null|array $config * - * @return null|\Twig_Markup + * @return \Twig_Markup * @throws \yii\web\NotFoundHttpException */ - public function includeCssModule(string $moduleName, bool $async = false, $config = null) + public function includeCssModule(string $moduleName, bool $async = false, $config = null): \Twig_Markup { return Template::raw( ManifestHelper::getCssModuleTags(self::$config, $moduleName, $async) ); } + /** + * Returns the CSS file in $path wrapped in tags + * + * @param string $path + * + * @return \Twig_Markup + */ + public function includeInlineCssTags(string $path): \Twig_Markup + { + return Template::raw( + ManifestHelper::getCssRelPreloadPolyfill() + ); + } + /** * Returns the uglified loadCSS rel=preload Polyfill as per: * https://github.com/filamentgroup/loadCSS#how-to-use-loadcss-recommended-example * - * @return string + * @return \Twig_Markup */ - public static function includeCssRelPreloadPolyfill(): string + public static function includeCssRelPreloadPolyfill(): \Twig_Markup { return Template::raw( ManifestHelper::getCssRelPreloadPolyfill() @@ -115,10 +129,40 @@ public function getModuleUri(string $moduleName, string $type = 'modern', $confi * * @return \Twig_Markup */ - public function includeSafariNomoduleFix() + public function includeSafariNomoduleFix(): \Twig_Markup { return Template::raw( ManifestHelper::getSafariNomoduleFix() ); } + + /** + * Returns the contents of a file from a URI path + * + * @param string $path + * + * @return \Twig_Markup + */ + public function includeFile(string $path): \Twig_Markup + { + return Template::raw( + ManifestHelper::getFile($path) + ); + } + + /** + * Returns the contents of a file from the $fileName in the manifest + * + * @param string $fileName + * @param string $type + * @param null $config + * + * @return \Twig_Markup + */ + public function includeFileFromManifest(string $fileName, string $type = 'legacy', $config = null): \Twig_Markup + { + return Template::raw( + ManifestHelper::getFileFromManifest($fileName, $type, $config) + ); + } } From 2bcad654168598c3dcb1a411dbb92b5b12e39205 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 11 Oct 2018 17:12:07 -0400 Subject: [PATCH 10/15] Added a link to the **variant does not exist** to aid in diagnosing what is wrong Signed-off-by: Andrew Welch --- .../_components/fields/OptimizedImages_input.twig | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/templates/_components/fields/OptimizedImages_input.twig b/src/templates/_components/fields/OptimizedImages_input.twig index 867a78ea..8c13702e 100644 --- a/src/templates/_components/fields/OptimizedImages_input.twig +++ b/src/templates/_components/fields/OptimizedImages_input.twig @@ -166,10 +166,16 @@ {% endif %} @@ -288,4 +294,4 @@ }); } {% endjs %} -{% endif %} \ No newline at end of file +{% endif %} From 54bb61548b12fba66c6bfaca12dd5667a39716cd Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 11 Oct 2018 17:12:16 -0400 Subject: [PATCH 11/15] Version 1.4.41 Signed-off-by: Andrew Welch --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2acf8f19..28123861 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## 1.4.41 - 2018.10.09 ### Changed * Fixed an issue where volumes with sub-folders such as Amazon S3 or Google Cloud didn't generate the correct URLs +* Fixed the build process so it will no longer look for `devServer` on installs +* Added a link to the **variant does not exist** to aid in diagnosing what is wrong ## 1.4.40 - 2018.10.05 ### Added From 77f8ad9240e527adfd5fa66214e6e98557096147 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 11 Oct 2018 17:12:23 -0400 Subject: [PATCH 12/15] Fixed the build process so it will no longer look for `devServer` on installs Signed-off-by: Andrew Welch --- src/helpers/Manifest.php | 195 +++++++++++++++++++++++++++++++-------- 1 file changed, 157 insertions(+), 38 deletions(-) diff --git a/src/helpers/Manifest.php b/src/helpers/Manifest.php index 5af1db0c..28a15662 100644 --- a/src/helpers/Manifest.php +++ b/src/helpers/Manifest.php @@ -42,6 +42,11 @@ class Manifest */ protected static $files; + /** + * @var bool + */ + protected static $isHot = false; + // Public Static Methods // ========================================================================= @@ -50,10 +55,10 @@ class Manifest * @param string $moduleName * @param bool $async * - * @return null|string + * @return string * @throws NotFoundHttpException */ - public static function getCssModuleTags(array $config, string $moduleName, bool $async) + public static function getCssModuleTags(array $config, string $moduleName, bool $async): string { $legacyModule = self::getModule($config, $moduleName, 'legacy', true); if ($legacyModule === null) { @@ -70,6 +75,22 @@ public static function getCssModuleTags(array $config, string $moduleName, bool return implode("\r\n", $lines); } + /** + * @param string $path + * + * @return string + */ + public static function getCssInlineTags(string $path): string + { + $result = self::getFile($path); + if ($result) { + $result = "\r\n"; + return $result; + } + + return ''; + } + /** * Returns the uglified loadCSS rel=preload Polyfill as per: * https://github.com/filamentgroup/loadCSS#how-to-use-loadcss-recommended-example @@ -157,13 +178,51 @@ public static function getSafariNomoduleFix(): string * @throws NotFoundHttpException */ public static function getModule(array $config, string $moduleName, string $type = 'modern', bool $soft = false) + { + // Get the module entry + $module = self::getModuleEntry($config, $moduleName, $type, $soft); + if ($module !== null) { + $prefix = self::$isHot + ? $config['devServer']['publicPath'] + : $config['server']['publicPath']; + // If the module isn't a full URL, prefix it + if (!UrlHelper::isAbsoluteUrl($module)) { + $module = self::combinePaths($prefix, $module); + } + // Resolve any aliases + $alias = Craft::getAlias($module, false); + if ($alias) { + $module = $alias; + } + // Make sure it's a full URL + if (!UrlHelper::isAbsoluteUrl($module) && !is_file($module)) { + try { + $module = UrlHelper::siteUrl($module); + } catch (Exception $e) { + Craft::error($e->getMessage(), __METHOD__); + } + } + } + + return $module; + } + + /** + * Return a module's raw entry from the manifest + * + * @param array $config + * @param string $moduleName + * @param string $type + * @param bool $soft + * + * @return null|string + * @throws NotFoundHttpException + */ + public static function getModuleEntry(array $config, string $moduleName, string $type = 'modern', bool $soft = false) { $module = null; - // Determine whether we should use the devServer for HMR or not - $devMode = Craft::$app->getConfig()->getGeneral()->devMode; - $isHot = ($devMode && $config['useDevServer']); // Get the manifest file - $manifest = self::getManifestFile($config, $isHot, $type); + $manifest = self::getManifestFile($config, $type); if ($manifest !== null) { // Make sure it exists in the manifest if (empty($manifest[$moduleName])) { @@ -176,21 +235,6 @@ public static function getModule(array $config, string $moduleName, string $type return null; } $module = $manifest[$moduleName]; - $prefix = $isHot - ? $config['devServer']['publicPath'] - : $config['server']['publicPath']; - // If the module isn't a full URL, prefix it - if (!UrlHelper::isAbsoluteUrl($module)) { - $module = self::combinePaths($prefix, $module); - } - // Make sure it's a full URL - if (!UrlHelper::isAbsoluteUrl($module)) { - try { - $module = UrlHelper::siteUrl($module); - } catch (Exception $e) { - Craft::error($e->getMessage(), __METHOD__); - } - } } return $module; @@ -200,23 +244,25 @@ public static function getModule(array $config, string $moduleName, string $type * Return a JSON-decoded manifest file * * @param array $config - * @param bool $isHot * @param string $type * * @return null|array * @throws NotFoundHttpException */ - public static function getManifestFile(array $config, bool &$isHot, string $type = 'modern') + public static function getManifestFile(array $config, string $type = 'modern') { $manifest = null; + // Determine whether we should use the devServer for HMR or not + $devMode = Craft::$app->getConfig()->getGeneral()->devMode; + self::$isHot = ($devMode && $config['useDevServer']); // Try to get the manifest while ($manifest === null) { - $manifestPath = $isHot + $manifestPath = self::$isHot ? $config['devServer']['manifestPath'] : $config['server']['manifestPath']; // Normalize the path $path = self::combinePaths($manifestPath, $config['manifest'][$type]); - $manifest = self::getJsonFileFromUri($path); + $manifest = self::getJsonFile($path); // If the manifest isn't found, and it was hot, fall back on non-hot if ($manifest === null) { // We couldn't find a manifest; throw an error @@ -225,9 +271,9 @@ public static function getManifestFile(array $config, bool &$isHot, string $type 'Manifest file not found at: {manifestPath}', ['manifestPath' => $manifestPath] ), true); - if ($isHot) { + if (self::$isHot) { // Try again, but not with home module replacement - $isHot = false; + self::$isHot = false; } else { // Give up and return null return null; @@ -238,6 +284,56 @@ public static function getManifestFile(array $config, bool &$isHot, string $type return $manifest; } + /** + * Returns the contents of a file from a URI path + * + * @param string $path + * + * @return string + */ + public static function getFile(string $path): string + { + return self::getFileFromUri($path, null) ?? ''; + } + + /** + * @param array $config + * @param string $fileName + * @param string $type + * + * @return string + */ + public static function getFileFromManifest(array $config, string $fileName, string $type = 'legacy'): string + { + try { + $path = self::getModuleEntry($config, $fileName, $type, true); + } catch (NotFoundHttpException $e) { + Craft::error($e->getMessage(), __METHOD__); + } + if ($path !== null) { + $path = self::combinePaths( + $config['localFiles']['basePath'], + $path + ); + + return self::getFileFromUri($path, null) ?? ''; + } + + return ''; + } + + /** + * Return the contents of a JSON file from a URI path + * + * @param string $path + * + * @return null|array + */ + protected static function getJsonFile(string $path) + { + return self::getFileFromUri($path, [self::class, 'jsonFileDecode']); + } + /** * Invalidate all of the manifest caches */ @@ -254,12 +350,18 @@ public static function invalidateCaches() /** * Return the contents of a file from a URI path * - * @param string $path + * @param string $path + * @param callable|null $callback * - * @return mixed + * @return null|mixed */ - protected static function getJsonFileFromUri(string $path) + protected static function getFileFromUri(string $path, callable $callback = null) { + // Resolve any aliases + $alias = Craft::getAlias($path, false); + if ($alias) { + $path = $alias; + } // Make sure it's a full URL if (!UrlHelper::isAbsoluteUrl($path) && !is_file($path)) { try { @@ -269,17 +371,18 @@ protected static function getJsonFileFromUri(string $path) } } - return self::getJsonFileContents($path); + return self::getFileContents($path, $callback); } /** * Return the contents of a file from the passed in path * - * @param string $path + * @param string $path + * @param callable $callback * - * @return mixed + * @return null|mixed */ - protected static function getJsonFileContents(string $path) + protected static function getFileContents(string $path, callable $callback = null) { // Return the memoized manifest if it exists if (!empty(self::$files[$path])) { @@ -300,11 +403,14 @@ protected static function getJsonFileContents(string $path) $cache = Craft::$app->getCache(); $file = $cache->getOrSet( self::CACHE_KEY.$path, - function () use ($path) { + function () use ($path, $callback) { $result = null; - $string = @file_get_contents($path); - if ($string) { - $result = JsonHelper::decodeIfJson($string); + $contents = @file_get_contents($path); + if ($contents) { + $result = $contents; + if ($callback) { + $result = $callback($result); + } } return $result; @@ -364,4 +470,17 @@ protected static function reportError(string $error, $soft = false) } Craft::error($error, __METHOD__); } + + // Private Static Methods + // ========================================================================= + + /** + * @param $string + * + * @return mixed + */ + private static function jsonFileDecode($string) + { + return JsonHelper::decodeIfJson($string); + } } From b883946131ec36203700f68bf3599ff77c624fc5 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 11 Oct 2018 18:23:33 -0400 Subject: [PATCH 13/15] Changed the signature of `::getWebPUrl()` to send in all of the transform params Signed-off-by: Andrew Welch --- src/imagetransforms/CraftImageTransform.php | 7 +++++-- src/imagetransforms/ImageTransform.php | 7 +++++-- src/imagetransforms/ImageTransformInterface.php | 7 +++++-- src/imagetransforms/ImgixImageTransform.php | 7 +++++-- src/services/OptimizedImages.php | 7 ++++++- 5 files changed, 26 insertions(+), 9 deletions(-) diff --git a/src/imagetransforms/CraftImageTransform.php b/src/imagetransforms/CraftImageTransform.php index 74edd0db..49cf7597 100644 --- a/src/imagetransforms/CraftImageTransform.php +++ b/src/imagetransforms/CraftImageTransform.php @@ -44,11 +44,14 @@ public static function getTransformUrl(Asset $asset, $transform, array $params = } /** - * @param string $url + * @param string $url + * @param Asset $asset + * @param AssetTransform|null $transform + * @param array $params * * @return string */ - public static function getWebPUrl(string $url): string + public static function getWebPUrl(string $url, Asset $asset, $transform, array $params = []): string { $url = self::appendExtension($url, '.webp'); diff --git a/src/imagetransforms/ImageTransform.php b/src/imagetransforms/ImageTransform.php index c5ae077d..82ab06dc 100644 --- a/src/imagetransforms/ImageTransform.php +++ b/src/imagetransforms/ImageTransform.php @@ -41,11 +41,14 @@ public static function getTransformUrl(Asset $asset, $transform, array $params = } /** - * @param string $url + * @param string $url + * @param Asset $asset + * @param AssetTransform|null $transform + * @param array $params * * @return string */ - public static function getWebPUrl(string $url): string + public static function getWebPUrl(string $url, Asset $asset, $transform, array $params = []): string { return $url; } diff --git a/src/imagetransforms/ImageTransformInterface.php b/src/imagetransforms/ImageTransformInterface.php index 432add39..2f415cdd 100644 --- a/src/imagetransforms/ImageTransformInterface.php +++ b/src/imagetransforms/ImageTransformInterface.php @@ -41,11 +41,14 @@ interface ImageTransformInterface public static function getTransformUrl(Asset $asset, $transform, array $params = []); /** - * @param string $url + * @param string $url + * @param Asset $asset + * @param AssetTransform|null $transform + * @param array $params * * @return string */ - public static function getWebPUrl(string $url): string; + public static function getWebPUrl(string $url, Asset $asset, $transform, array $params = []): string; /** * @param Asset $asset diff --git a/src/imagetransforms/ImgixImageTransform.php b/src/imagetransforms/ImgixImageTransform.php index 17759d5c..194dcc6b 100644 --- a/src/imagetransforms/ImgixImageTransform.php +++ b/src/imagetransforms/ImgixImageTransform.php @@ -155,11 +155,14 @@ public static function getTransformUrl(Asset $asset, $transform, array $params = } /** - * @param string $url + * @param string $url + * @param Asset $asset + * @param AssetTransform|null $transform + * @param array $params * * @return string */ - public static function getWebPUrl(string $url): string + public static function getWebPUrl(string $url, Asset $asset, $transform, array $params = []): string { $url = preg_replace('/fm=[^&]*/', 'fm=webp', $url); diff --git a/src/services/OptimizedImages.php b/src/services/OptimizedImages.php index c7789993..9859eaf8 100644 --- a/src/services/OptimizedImages.php +++ b/src/services/OptimizedImages.php @@ -244,7 +244,12 @@ protected function addVariantImageToModel(Asset $asset, OptimizedImage $model, $ //ImageOptimize::$transformClass::prefetchRemoteFile($url); $model->optimizedImageUrls[$transform->width] = $url; // Store & prefetch image at the webp URL - $webPUrl = ImageOptimize::$transformClass::getWebPUrl($url); + $webPUrl = ImageOptimize::$transformClass::getWebPUrl( + $url, + $asset, + $transform, + ImageOptimize::$transformParams + ); //ImageOptimize::$transformClass::prefetchRemoteFile($webPUrl); $model->optimizedWebPImageUrls[$transform->width] = $webPUrl; $model->focalPoint = $asset->focalPoint; From c48cba9558a6454f195dbdff3f8c027bf2fee2d3 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 11 Oct 2018 18:23:40 -0400 Subject: [PATCH 14/15] Version 1.4.41 Signed-off-by: Andrew Welch --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28123861..e4e29df3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Fixed an issue where volumes with sub-folders such as Amazon S3 or Google Cloud didn't generate the correct URLs * Fixed the build process so it will no longer look for `devServer` on installs * Added a link to the **variant does not exist** to aid in diagnosing what is wrong +* Changed the signature of `::getWebPUrl()` to send in all of the transform params ## 1.4.40 - 2018.10.05 ### Added From 35e52e165ac93b12e639f30f0353e15629f15164 Mon Sep 17 00:00:00 2001 From: Andrew Welch Date: Thu, 11 Oct 2018 23:01:42 -0400 Subject: [PATCH 15/15] Version 1.4.41 Signed-off-by: Andrew Welch --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e4e29df3..426ee83e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # ImageOptimize Changelog -## 1.4.41 - 2018.10.09 +## 1.4.41 - 2018.10.11 ### Changed * Fixed an issue where volumes with sub-folders such as Amazon S3 or Google Cloud didn't generate the correct URLs * Fixed the build process so it will no longer look for `devServer` on installs