Skip to content

Commit c951ef4

Browse files
committed
Move optimize.js to project root
1 parent f60649b commit c951ef4

File tree

4 files changed

+13
-12
lines changed

4 files changed

+13
-12
lines changed

.dockerignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
!convert.js
66
!index.js
77
!LICENSE
8+
!optimize.js
89
!package*.json

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { pathToFileURL } from 'node:url';
22

33
import { convert } from './convert.js';
4+
import { optimize } from './optimize.js';
45

56
import { SUPPORTED_FILE_TYPES } from './lib/constants.js';
67
import { findConfigFilePath } from './lib/find-config-file-path.js';
78
import { log } from './lib/log.js';
8-
import { optimize } from './lib/optimize.js';
99
import { prepareFilePaths } from './lib/prepare-file-paths.js';
1010
import { prepareOutputDirectoryPath } from './lib/prepare-output-directory-path.js';
1111
import { programOptions } from './lib/program-options.js';

lib/optimize.js optimize.js

+10-10
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ import pLimit from 'p-limit';
99
import sharp from 'sharp';
1010
import { optimize as svgoOptimize } from 'svgo';
1111

12-
import { calculateRatio } from './calculate-ratio.js';
13-
import { createProgressBarContainer } from './create-progress-bar-container.js';
14-
import { formatBytes } from './format-bytes.js';
15-
import { getPlural } from './get-plural.js';
16-
import { getRelativePath } from './get-relative-path.js';
12+
import { calculateRatio } from './lib/calculate-ratio.js';
13+
import { createProgressBarContainer } from './lib/create-progress-bar-container.js';
14+
import { formatBytes } from './lib/format-bytes.js';
15+
import { getPlural } from './lib/get-plural.js';
16+
import { getRelativePath } from './lib/get-relative-path.js';
1717
import {
1818
LOG_TYPES,
1919
log,
2020
logProgress,
2121
logProgressVerbose,
22-
} from './log.js';
23-
import { optionsToArguments } from './options-to-arguments.js';
24-
import { parseImageMetadata } from './parse-image-metadata.js';
25-
import { programOptions } from './program-options.js';
26-
import { showTotal } from './show-total.js';
22+
} from './lib/log.js';
23+
import { optionsToArguments } from './lib/options-to-arguments.js';
24+
import { parseImageMetadata } from './lib/parse-image-metadata.js';
25+
import { programOptions } from './lib/program-options.js';
26+
import { showTotal } from './lib/show-total.js';
2727

2828
export async function optimize({ filePaths, config }) {
2929
const { isLossless } = programOptions;

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"convert.js",
3333
"index.js",
3434
"lib/",
35-
"svgo/",
35+
"optimize.js",
3636
".optimiztrc.cjs"
3737
],
3838
"scripts": {

0 commit comments

Comments
 (0)