makepack 1.6.7 → 1.6.8

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "makepack",
3
- "version": "1.6.7",
3
+ "version": "1.6.8",
4
4
  "type": "module",
5
5
  "description": "A CLI tool to create, build, and manage JavaScript, TypeScript, React, and React-TypeScript libraries for npm projects.",
6
6
  "files": [
@@ -135,22 +135,8 @@ const build = async (args) => {
135
135
  const pkgPath = path.join(process.cwd(), 'package.json');
136
136
  if (fs.existsSync(pkgPath)) {
137
137
  const pkgjson = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
138
- if (args.format === 'default') {
139
- pkgjson.main = "./index.cjs";
140
- pkgjson.module = "./index.mjs";
141
- pkgjson.types = './index.d.ts'
142
- } else {
143
- let t = args.format === 'mjs' ? 'module' : 'main';
144
- pkgjson[t] = `./index.${args.format}`;
145
- }
146
-
147
- if (args.declaration) {
148
- pkgjson.types = `./index.d.ts`;
149
- }
150
-
151
138
  delete pkgjson.scripts
152
139
  delete pkgjson.type
153
-
154
140
  fs.writeFileSync(path.join(outdir, 'package.json'), JSON.stringify(pkgjson, null, 2));
155
141
  } else {
156
142
  spinner.fail("package.json not found!");
@@ -53,7 +53,7 @@ export default async (info) => {
53
53
  "default": "./*.js"
54
54
  }
55
55
  },
56
- "./cjs": null,
56
+ "./cjs": null
57
57
  },
58
58
  dependencies,
59
59
  devDependencies