mirror of
https://github.com/svg/svgo.git
synced 2025-07-29 20:21:14 +03:00
feat: export version constant (#2016)
This commit is contained in:
@ -2,7 +2,7 @@ import os from 'os';
|
||||
import fs from 'fs';
|
||||
import { pathToFileURL } from 'url';
|
||||
import path from 'path';
|
||||
import { optimize as optimizeAgnostic } from './svgo.js';
|
||||
import { VERSION, optimize as optimizeAgnostic } from './svgo.js';
|
||||
|
||||
const importConfig = async (configFile) => {
|
||||
// dynamic import expects file url instead of path and may fail
|
||||
@ -25,6 +25,8 @@ const isFile = async (file) => {
|
||||
}
|
||||
};
|
||||
|
||||
export { VERSION };
|
||||
|
||||
export const loadConfig = async (configFile, cwd = process.cwd()) => {
|
||||
if (configFile != null) {
|
||||
if (path.isAbsolute(configFile)) {
|
||||
|
Reference in New Issue
Block a user