Skip to content

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
Took 5 seconds
  • Loading branch information
erikyo committed Apr 8, 2024
1 parent f049931 commit c7f10e7
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"postbuild": "npx esbuild src/index.ts --outfile=lib/cjs/index.js --bundle --platform=node --minify && tsc --emitDeclarationOnly --outDir lib/@types/",
"watch": "tsc --watch --sourceMap --outDir lib/esm/",
"squashify": "node . --in tests/images/ --out tests/output --verbose",
"squashifyDefaults": "node . -d",
"test": "vitest --coverage"
},
"files": [
Expand Down
8 changes: 3 additions & 5 deletions src/args.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
import { defaultConfigFile, extModes } from "./constants.js";
import yargs from "yargs";
import yargs, { Argv } from "yargs";
import { CliOptions, ExtMode, ResizeType, resizeType } from "./types.js";
import { hideBin } from "yargs/helpers";
import { generateDefaultConfigFile } from "./utils";
import { generateDefaultConfigFile } from "./utils.js";

/**
* Get the command-line settings
*/
export function getCliOptions(
rawArgs: yargs.Argv<object> | undefined,
): CliOptions {
export function getCliOptions(rawArgs: Argv<object> | undefined): CliOptions {
if (!rawArgs) {
rawArgs = yargs(hideBin(process.argv));
}
Expand Down
2 changes: 1 addition & 1 deletion src/encodeImage.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { CompressionMeta, OutputData } from "./types";
import { CompressionMeta, OutputData } from "./types.js";
import sharp, { FitEnum } from "sharp";
import { transparentColor } from "./constants.js";

Expand Down
2 changes: 1 addition & 1 deletion src/prompts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
getImageCompressionOptions,
srcDirQuestion,
} from "./options.js";
import { CompressionOptionsMap, type ScriptOptions } from "./types";
import { CompressionOptionsMap, type ScriptOptions } from "./types.js";
import {
defaultCompressionOptions,
getImageFormatsInFolder,
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"compilerOptions": {
"module": "ESNext",
"moduleResolution": "node",
"module": "NodeNext",
"moduleResolution": "NodeNext",
"target": "ESNext",
"esModuleInterop": true,
"strict": true,
Expand Down

0 comments on commit c7f10e7

Please sign in to comment.