From e7061e5966bb08d23b9563483de42b7c518b5721 Mon Sep 17 00:00:00 2001 From: dpilafian Date: Sat, 19 Nov 2022 02:36:38 -0800 Subject: [PATCH] Release v0.1.1 --- README.md | 6 ++++-- dist/img-src-placeholder.d.ts | 6 +++--- dist/img-src-placeholder.js | 2 +- dist/img-src-placeholder.umd.cjs | 2 +- package.json | 2 +- spec/mocha.spec.js | 10 +++++----- 6 files changed, 15 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 1235346..ade43b7 100644 --- a/README.md +++ b/README.md @@ -91,8 +91,10 @@ See the **TypeScript Declarations** at the top of [img-src-placeholder.ts](img-s ## D) Under the Hood The data URL is created by **Base64** encoding a super simple `` string: ```javascript -const onePixelSvg = ''; -const dataImage = 'data:image/svg+xml;base64,' + Buffer.from(onePixelSvg).toString('base64'); +const onePixelSvg = + ''; +const dataImage = 'data:image/svg+xml;base64,' + + Buffer.from(onePixelSvg).toString('base64'); ```
diff --git a/dist/img-src-placeholder.d.ts b/dist/img-src-placeholder.d.ts index 68275f2..40575df 100644 --- a/dist/img-src-placeholder.d.ts +++ b/dist/img-src-placeholder.d.ts @@ -1,12 +1,12 @@ -//! img-src-placeholder v0.1.0 ~~ https://github.com/center-key/img-src-placeholder ~~ MIT License +//! img-src-placeholder v0.1.1 ~~ https://github.com/center-key/img-src-placeholder ~~ MIT License import { Results } from 'replacer-util'; -export declare type Settings = { +export type Settings = { cd: string | null; extensions: string[]; filename: string | null; }; -export declare type Options = Partial; +export type Options = Partial; declare const imgSrcPlaceholder: { htmlExts: string[]; transform(sourceFolder: string, targetFolder: string, options?: Options): Results; diff --git a/dist/img-src-placeholder.js b/dist/img-src-placeholder.js index d5c1783..fd85f2f 100644 --- a/dist/img-src-placeholder.js +++ b/dist/img-src-placeholder.js @@ -1,4 +1,4 @@ -//! img-src-placeholder v0.1.0 ~~ https://github.com/center-key/img-src-placeholder ~~ MIT License +//! img-src-placeholder v0.1.1 ~~ https://github.com/center-key/img-src-placeholder ~~ MIT License import { replacer } from 'replacer-util'; const imgSrcPlaceholder = { diff --git a/dist/img-src-placeholder.umd.cjs b/dist/img-src-placeholder.umd.cjs index 031e365..34b04d8 100644 --- a/dist/img-src-placeholder.umd.cjs +++ b/dist/img-src-placeholder.umd.cjs @@ -1,4 +1,4 @@ -//! img-src-placeholder v0.1.0 ~~ https://github.com/center-key/img-src-placeholder ~~ MIT License +//! img-src-placeholder v0.1.1 ~~ https://github.com/center-key/img-src-placeholder ~~ MIT License (function (factory) { if (typeof module === "object" && typeof module.exports === "object") { diff --git a/package.json b/package.json index 979546a..61f3767 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "img-src-placeholder", - "version": "0.1.0", + "version": "0.1.1", "description": "Replace src=# in tags of HTML files with an inline data URL of a transparent 1 pixel image (CLI tool designed for use in npm scripts)", "license": "MIT", "type": "module", diff --git a/spec/mocha.spec.js b/spec/mocha.spec.js index 91aaba1..18f892c 100644 --- a/spec/mocha.spec.js +++ b/spec/mocha.spec.js @@ -11,7 +11,7 @@ import fs from 'fs'; // Setup import { imgSrcPlaceholder } from '../dist/img-src-placeholder.js'; -//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// describe('The "dist" folder', () => { it('contains the correct files', () => { @@ -26,7 +26,7 @@ describe('The "dist" folder', () => { }); -//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// describe('Library module', () => { it('is an object', () => { @@ -43,7 +43,7 @@ describe('Library module', () => { }); -//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// describe('Calling imgSrcPlaceholder.transform()', () => { it('creates the correct text files in the target folder', () => { @@ -59,7 +59,7 @@ describe('Calling imgSrcPlaceholder.transform()', () => { }); -//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// describe('Correct error is thrown', () => { it('when the "source" folder is missing', () => { @@ -76,7 +76,7 @@ describe('Correct error is thrown', () => { }); -//////////////////////////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// describe('Executing the CLI', () => { it('creates the expected file with the correct placeholder', () => {