Skip to content

Commit

Permalink
Move convert.js to project root
Browse files Browse the repository at this point in the history
  • Loading branch information
343dev committed Oct 3, 2024
1 parent 826496d commit f60649b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 2,7 @@
!lib/
!.optimiztrc.cjs
!cli.js
!convert.js
!index.js
!LICENSE
!package*.json
24 changes: 12 additions & 12 deletions lib/convert.js → convert.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 7,23 @@ import gif2webp from 'gif2webp-bin';
import pLimit from 'p-limit';
import sharp from 'sharp';

import { calculateRatio } from './calculate-ratio.js';
import { checkPathAccessibility } from './check-path-accessibility.js';
import { createProgressBarContainer } from './create-progress-bar-container.js';
import { SUPPORTED_FILE_TYPES } from './constants.js';
import { formatBytes } from './format-bytes.js';
import { getPlural } from './get-plural.js';
import { getRelativePath } from './get-relative-path.js';
import { calculateRatio } from './lib/calculate-ratio.js';
import { checkPathAccessibility } from './lib/check-path-accessibility.js';
import { createProgressBarContainer } from './lib/create-progress-bar-container.js';
import { SUPPORTED_FILE_TYPES } from './lib/constants.js';
import { formatBytes } from './lib/format-bytes.js';
import { getPlural } from './lib/get-plural.js';
import { getRelativePath } from './lib/get-relative-path.js';
import {
LOG_TYPES,
log,
logProgress,
logProgressVerbose,
} from './log.js';
import { optionsToArguments } from './options-to-arguments.js';
import { parseImageMetadata } from './parse-image-metadata.js';
import { programOptions } from './program-options.js';
import { showTotal } from './show-total.js';
} from './lib/log.js';
import { optionsToArguments } from './lib/options-to-arguments.js';
import { parseImageMetadata } from './lib/parse-image-metadata.js';
import { programOptions } from './lib/program-options.js';
import { showTotal } from './lib/show-total.js';

export async function convert({ filePaths, config }) {
const {
Expand Down
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,7 1,8 @@
import { pathToFileURL } from 'node:url';

import { convert } from './convert.js';

import { SUPPORTED_FILE_TYPES } from './lib/constants.js';
import { convert } from './lib/convert.js';
import { findConfigFilePath } from './lib/find-config-file-path.js';
import { log } from './lib/log.js';
import { optimize } from './lib/optimize.js';
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 29,7 @@
"files": [
"MIGRATION.md",
"cli.js",
"convert.js",
"index.js",
"lib/",
"svgo/",
Expand Down

0 comments on commit f60649b

Please sign in to comment.