mirror of
https://github.com/svg/svgo.git
synced 2025-07-28 09:22:00 +03:00
chore: export default and named packages (#2022)
This commit is contained in:
4
lib/svgo-node.d.ts
vendored
4
lib/svgo-node.d.ts
vendored
@ -1,6 +1,6 @@
|
|||||||
import { Config, optimize } from './svgo';
|
import { VERSION, Config, optimize } from './svgo';
|
||||||
|
|
||||||
export { optimize };
|
export { VERSION, optimize };
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If you write a tool on top of svgo you might need a way to load svgo config.
|
* If you write a tool on top of svgo you might need a way to load svgo config.
|
||||||
|
@ -74,3 +74,9 @@ export const optimize = (input, config) => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
VERSION,
|
||||||
|
loadConfig,
|
||||||
|
optimize,
|
||||||
|
};
|
||||||
|
@ -100,3 +100,8 @@ export const optimize = (input, config) => {
|
|||||||
data: output,
|
data: output,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default {
|
||||||
|
VERSION,
|
||||||
|
optimize,
|
||||||
|
};
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
/** Version of SVGO. */
|
/** Version of SVGO. */
|
||||||
export const VERSION = '4.0.0';
|
export const VERSION = '4.0.0-rc.0';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"packageManager": "yarn@3.8.2",
|
"packageManager": "yarn@3.8.2",
|
||||||
"name": "svgo",
|
"name": "svgo",
|
||||||
"version": "4.0.0",
|
"version": "4.0.0-rc.0",
|
||||||
"description": "SVGO is a Node.js library and command-line application for optimizing vector images.",
|
"description": "SVGO is a Node.js library and command-line application for optimizing vector images.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
|
@ -39,6 +39,7 @@ export default [
|
|||||||
output: {
|
output: {
|
||||||
file: './dist/svgo-node.cjs',
|
file: './dist/svgo-node.cjs',
|
||||||
format: 'cjs',
|
format: 'cjs',
|
||||||
|
exports: 'named',
|
||||||
},
|
},
|
||||||
external: ['os', 'fs', 'url', 'path', ...Object.keys(PKG.dependencies)],
|
external: ['os', 'fs', 'url', 'path', ...Object.keys(PKG.dependencies)],
|
||||||
onwarn(warning) {
|
onwarn(warning) {
|
||||||
|
Reference in New Issue
Block a user