Skip to content

Solves issue #29 and improves PR #18#35

Open
BePo65 wants to merge 17 commits intoschlosser:masterfrom
BePo65:pu/issue29v3
Open

Solves issue #29 and improves PR #18#35
BePo65 wants to merge 17 commits intoschlosser:masterfrom
BePo65:pu/issue29v3

Conversation

@BePo65
Copy link
Contributor

@BePo65 BePo65 commented Oct 14, 2021

This PR updates PIG to enable customization of ProgressiveImage and thereby extend the html created within each <figure> tag.

I did not merge all my commits to make it easier to review the changes.

Here is what I did:

Refactoring

  • dropped support for pre IE8 css styles (market share is so small)
  • fixed base address of images in html pages in /test directory
  • changed source code to use arrow functions instead of anonymous functions (current technology)
  • changed source code to use es modules (current technology, supported by all browsers an node LTS)
  • migrated code to es6 (using classes) to enable customization of ProgressiveImage

Features

  • made ProgressiveImage customizable (customization is done by creating a derived class)
  • added demos with basic and with customized ProgressiveImage in directory /test using
    source file
    umd version
    packed esm version
  • updated README.md to include new API elements

Tooling

  • switched from gulp to esbuild to create umd version and packed es module from source
  • switched from gulp to eslint (with airbnb styles)
  • did not migrate gulp watch function, but could easily be added

BREAKING CHANGE

I moved code used for production systems to /dist (umd) or /dist/esm (esm) directory, to make it easier to publish the packages to npm.
But besides the new location of the code, using the basic (uncustomized) version did not change.

BePo65 added 17 commits October 29, 2023 07:31
Market share of IE is less than 1% and IE does not support classes
'style.type' is deprecated and today should be avoided
Classes are mocved to single files to make modifications easier to
comprehend; single files will be merged later on.
Needed to enable derived classes to overwrite generation of content of
<figure> tag.
This way derived ProgressiveImage classes can be used to customize
the content of the created <figure> tag.
Makes it possible to create an example for customized layouts
BREAKING CHANGE: pig.js and pig.min.js moved to dist/umd directory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant