Skip to content

Commit

Permalink
1.0.2
Browse files Browse the repository at this point in the history
Fixes #20
  • Loading branch information
NikolaRHristov committed Aug 18, 2022
1 parent 9ed4f97 commit 7cd2c4c
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.0.2

- Bug fix

## 1.0.1

- Bug fix
Expand Down
2 changes: 1 addition & 1 deletion dist/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { AstroIntegration } from "astro";
import { Options } from "./options";
import { Options } from "./options/index.js";
/**
* It takes in an object of options, and returns an object that Astro can use to create a plugin
* @param {Options} integrationOptions - Options = {}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js

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

2 changes: 1 addition & 1 deletion dist/lib/parse.js

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

2 changes: 1 addition & 1 deletion dist/lib/pipe-all.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Options } from "src/options";
import { Options } from "../options/index.js";
/**
* It takes a settings object, loops through each key, and calls the appropriate function for each key
* @param {Options} settings - Options - The settings object that you pass to the pipeAll function.
Expand Down
2 changes: 1 addition & 1 deletion dist/lib/pipe-all.js

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

2 changes: 1 addition & 1 deletion dist/lib/sharp-read.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import IMG from "src/options/img";
import IMG from "../options/img";
/**
* It takes a sharp file and an options object, and returns a buffer of the file in the format
* specified in the options object
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "astro-compress",
"version": "1.0.1",
"version": "1.0.2",
"type": "module",
"description": "🗜️ AstroJS compression utilities. Compress HTML, CSS, JavaScript and more.",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type { AstroIntegration } from "astro";
import { deepmerge } from "deepmerge-ts";

import defaultOptions, { Options } from "./options";
import pipeAll from "./lib/pipe-all";
import defaultOptions, { Options } from "./options/index.js";
import pipeAll from "./lib/pipe-all.js";

/**
* It takes in an object of options, and returns an object that Astro can use to create a plugin
Expand Down
4 changes: 2 additions & 2 deletions src/lib/parse.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import FastGlob from "fast-glob";
import fs from "fs";

import formatBytes from "./format-bytes";
import formatBytes from "./format-bytes.js";

/**
* It takes a glob, a debug level, a type, a write function, and a read function, and then it
Expand Down Expand Up @@ -72,7 +72,7 @@ export default async (
}
}

if (debug > 0) {
if (debug > 0 && savings.files > 0) {
console.info(
"\u001b[32mSuccessfully compressed a total of " +
savings.files +
Expand Down
6 changes: 3 additions & 3 deletions src/lib/pipe-all.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import sharp from "sharp";
import { optimize as svgo } from "svgo";
import { minify as terser } from "terser";

import { Options } from "src/options";
import parse from "./parse";
import sharpRead from "./sharp-read";
import { Options } from "../options/index.js";
import parse from "./parse.js";
import sharpRead from "./sharp-read.js";

/**
* It takes a settings object, loops through each key, and calls the appropriate function for each key
Expand Down
2 changes: 1 addition & 1 deletion src/lib/sharp-read.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import IMG from "src/options/img";
import IMG from "../options/img";

/**
* It takes a sharp file and an options object, and returns a buffer of the file in the format
Expand Down

0 comments on commit 7cd2c4c

Please sign in to comment.