smartbundle 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -95,6 +95,9 @@ async function run(args) {
95
95
  rollupOptions: {
96
96
  plugins: [typescript],
97
97
  external: (id, parentId, isResolved) => {
98
+ if (id === packageJson.name) {
99
+ return true;
100
+ }
98
101
  if (id.startsWith("node:")) {
99
102
  return true;
100
103
  }
package/package.json CHANGED
@@ -1,10 +1,21 @@
1
1
  {
2
2
  "name": "smartbundle",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.3",
5
5
  "bin": "src/bin.mjs",
6
+ "types": "src/run.d.ts",
7
+ "module": "src/run.mjs",
6
8
  "description": "",
7
- "exports": {},
9
+ "exports": {
10
+ ".": {
11
+ "types": "src/run.d.ts",
12
+ "import": {
13
+ "types": "src/run.d.ts",
14
+ "default": "src/run.mjs"
15
+ },
16
+ "default": "src/run.mjs"
17
+ }
18
+ },
8
19
  "dependencies": {
9
20
  "@rollup/plugin-typescript": "^11.1.6",
10
21
  "vite": "^5.3.4",
package/src/bin.mjs CHANGED
@@ -1,3 +1 @@
1
- import { args } from "../__do_not_import_directly__/args.mjs";
2
- import { run } from "../__do_not_import_directly__/index.mjs";
3
- run(args);
1
+ import("smartbundle").then(({ main }) => main());
package/src/run.d.ts ADDED
@@ -0,0 +1 @@
1
+ export declare function main(): void;
package/src/run.mjs ADDED
@@ -0,0 +1,6 @@
1
+ import { args } from "../__do_not_import_directly__/args.mjs";
2
+ import { run } from "../__do_not_import_directly__/index.mjs";
3
+ function main() {
4
+ run(args);
5
+ }
6
+ export { main };