Webpack 5 support with updated packages (#131)

- Update to Webpack 5
- Use @effortlessmotion dynamic html and inline source plugins
- Remove .clasp.json and use SAMPLE file
- Consistent prettier formatting throughout
- Update packages to latest versions

Co-authored-by: Kevin Malakoff <kmalakoff@gmail.com>
This commit is contained in:
Elisha Nuchi
2022-06-20 01:59:26 -04:00
committed by GitHub
parent 0adf784ba1
commit fd73dc051c
25 changed files with 7690 additions and 17891 deletions
+10 -6
View File
@@ -2,11 +2,15 @@
/**
* Reference: https://github.com/americanexpress/jest-image-snapshot/blob/main/examples/image-reporter.js
*
*
* To enable this image reporter, add it to your `jest.config.js` "reporters" definition:
* "reporters": [ "default", "<rootDir>/image-reporter.js" ]
*
* Image Reporter may not work with jest's --forceExit flag
*
* Note: Image Reporter may not work with jest's --forceExit flag
*
* Note: If image reporter doesn't work in pipeline can try running as standalone script
* by creating a separate script file and running like this:
* "test:integration": "jest test/local-development.test || node test/utils/image-reporter-standalone.js"
*/
const fs = require('fs');
@@ -44,9 +48,9 @@ class ImageReporter {
'./test/__image_snapshots__/',
'./test/__image_snapshots__/__diff_output__/',
];
targetDirectories.forEach(targetDirectory => {
targetDirectories.forEach((targetDirectory) => {
fs.readdirSync(targetDirectory, { withFileTypes: true }).forEach(
dirent => {
(dirent) => {
if (!dirent.isFile()) return;
const path = `images/${dirent.name}`;
const params = {
@@ -55,7 +59,7 @@ class ImageReporter {
Key: path,
ContentType: 'image/png',
};
s3.putObject(params, err => {
s3.putObject(params, (err) => {
if (err) {
console.log(err, err.stack);
} else {