Skip to content

Commit

Permalink
chore: export default and named packages (svg#2022)
Browse files Browse the repository at this point in the history
  • Loading branch information
SethFalco committed Jun 7, 2024
1 parent 1e23f66 commit 35d3fb6
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/svgo-node.d.ts
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 6 additions & 0 deletions lib/svgo-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,9 @@ export const optimize = (input, config) => {
},
});
};

export default {
VERSION,
loadConfig,
optimize,
};
5 changes: 5 additions & 0 deletions lib/svgo.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,8 @@ export const optimize = (input, config) => {
data: output,
};
};

export default {
VERSION,
optimize,
};
2 changes: 1 addition & 1 deletion lib/version.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
/** Version of SVGO. */
export const VERSION = '4.0.0';
export const VERSION = '4.0.0-rc.0';
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"packageManager": "yarn@3.8.2",
"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.",
"license": "MIT",
"type": "module",
Expand Down
1 change: 1 addition & 0 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ export default [
output: {
file: './dist/svgo-node.cjs',
format: 'cjs',
exports: 'named',
},
external: ['os', 'fs', 'url', 'path', ...Object.keys(PKG.dependencies)],
onwarn(warning) {
Expand Down

0 comments on commit 35d3fb6

Please sign in to comment.